Couple of JavaScript/HTML questions
OK, first problem. What I need to do is insert an HTML form PLUS the Javascript to display an alert box that says:
?NAME_FROM_FORM, thank you for the following comments:
****comments****
Your input is appreciated.?
The HTML page will have 3 elements: name, email, and comments.
Now I know that the HTML will just be:
\t<tr><td align=right><font CLASS="bodytext"><b>Name:</b></font></td><td><input NAME="Name" TYPE="Text" SIZE="50"></td></tr>
\t\t\t
\t\t\t<tr><td align=right><font CLASS="bodytext"><b>E-mail Address:</b></font></td><td><input NAME="email" TYPE="Text" SIZE="50"></td></tr>
\t\t\t
<tr><td align=right><font CLASS="bodytext">Comments:</font></td><td><input NAME="comments" TYPE="Text" SIZE="50"></td></tr>
but I dont know how to do the alert so it will display the comments on submit.
[ 02-13-2003: Message edited by: TigerWoods99 ]</p>
?NAME_FROM_FORM, thank you for the following comments:
****comments****
Your input is appreciated.?
The HTML page will have 3 elements: name, email, and comments.
Now I know that the HTML will just be:
\t<tr><td align=right><font CLASS="bodytext"><b>Name:</b></font></td><td><input NAME="Name" TYPE="Text" SIZE="50"></td></tr>
\t\t\t
\t\t\t<tr><td align=right><font CLASS="bodytext"><b>E-mail Address:</b></font></td><td><input NAME="email" TYPE="Text" SIZE="50"></td></tr>
\t\t\t
<tr><td align=right><font CLASS="bodytext">Comments:</font></td><td><input NAME="comments" TYPE="Text" SIZE="50"></td></tr>
but I dont know how to do the alert so it will display the comments on submit.
[ 02-13-2003: Message edited by: TigerWoods99 ]</p>
Comments
<form name=?formsAreCool? onsubmit=?return runJavascript();?>
?
<input type=?hidden? name=?nameToShow? value=?Bob?>
?
<input type=?submit?>
</form>
I tried something with the onLoad but it gave an error while doing it in IE. Can anyone help me?
Just an idea, and I haven't got the time to test it out right now...
[code]
<html>
<head>
<script language="JavaScript">
function myScript(cName) {
STRalert = cName + 'would you like to buy a...';
alert(STRalert);
}
</script>
</head>
< body bgcolor="white" 0nLoad="myScript('TigerWoods');" >
Your HTML Content Here
</body>
</html>
</pre><hr></blockquote>
Note: UBB wouldn't let me put onLoad in the code like that, so I used a Zero instead of an O (just in case you tried to copy and paste)