<html>
<head>
<title>JavaScript Alerts!</title>
</head>
<body>
<script language="javaScript" type="text/javascript">
</script>
<div align="center">
<form acriotn="" method="POST">
<input type="button" name="alertbutton" value="Click Me!" onClick="alert('Change this text whilst preserving the quotation marks to what you wish to appear in the messagebox...')"></input>
</form>
</div>
</body>
</html>
Triad2000 said:
 Great idea though, lets close the forums and tell everybody to use google
   Great idea though, lets close the forums and tell everybody to use google   
   
  
Triad2000 said:As far as I can see it shows him how to construct an html button. Was that not what he was after?
 Extremley sorry if I have...
  Extremley sorry if I have... 
Trigger said:Code:<html> <head> <title>JavaScript Alerts!</title> </head> <body> <script language="javaScript" type="text/javascript"> </script> <div align="center"> <form acriotn="" method="POST"> <input type="button" name="alertbutton" value="Click Me!" onClick="alert('Change this text whilst preserving the quotation marks to what you wish to appear in the messagebox...')"></input> </form> </div> </body> </html>

Triad2000 said:"I'm sure I've done this before using either HTML or Javascript..." or have I had too many beers?
 
 Triad2000 said:Coding after 4 or 5 pints gets interesting though.

PAz said:Thanks, thats kind of it. Need it to appear in an actual HTML textbox/field though as opposed to a window prompt.
I tried changing the alert to the textbox name but that didn't work!

alertdocument.write
 After a bit of playing about, I've done what you're after:
  After a bit of playing about, I've done what you're after:<html>
<head>
<title>JavaScript Alerts!</title>
</head>
<body>
<script language="javaScript" type="text/javascript">
</script>
<div align="center">
<form action="" method="POST" name="form1">
<input type="button" name="alertbutton" value="Click Me!" onClick="document.form1.output.value='Change this text whilst preserving the quotation marks to what you wish to appear in the text box...'"></input>
<p>
<textarea name="output">
</textarea>
</p>
</form>
</div>
</body>
</head>
Cuchulain said:Why have you opened a javascript tag and closed it with no actual javascript in between?
 It ws for another method I was trying and for some reason, I put the <form> tags inside the javascript tags and then moved it without deleting them
  It ws for another method I was trying and for some reason, I put the <form> tags inside the javascript tags and then moved it without deleting them  Sorry
  Sorry 
Trigger said:Oops, I forgot to take it outIt ws for another method I was trying and for some reason, I put the <form> tags inside the javascript tags and then moved it without deleting them
Sorry

jonnyg said:Dude, i asked practically the same question and no-one answered me, so ill tag on your thread - can you use a drop down box to select an <option> which then affects what appears in the said text box...?
<form name="form1">
<select name="Colour">
  <option selected>--Select Colour</option>
  <option value="Red" onClick="document.form1.output.value='Red'">Red</option>
  <option value="Green" onClick="document.form1.output.value='Green'">Green</option>
  <option value="Blue" onClick="document.form1.output.value='Blue'">Blue</option>
</select>
<br>
<textarea name="output">
</textarea>
</form> 
 
 
	