I’m trying to make a dynamic page that does something kind of arrbitrary like making a sentence. More specifically, I want a form where a user can enter thier name, and hieght. Then, when they click submit I am trying to get it the sentence to show up in a text box below that would say something like “Hi, Ashley, you are 5’8″!” Sounds kinda stupid and basic but it’s kicking my ***. I’ve kind of used elements from the scripts on this site to do this.
Here’s what I have so far:
<html>
<head>
<script language=”Javascript”>
function beginGenerator() {
var name = document.generator.name.value;
var height = document.generator.height.value;
}
</script>
</head>
<FORM name=”generator”><B>Input:</B><BR>
<TABLE cellPadding=0>
<TBODY>
<TR>
<TD>Name: <INPUT type=”text” name=”name”>
</tr>
<tr>
<TD>Height: <INPUT type=”number” name=”height”>
</tr>
<tr>
<TD><INPUT onclick=”beginGenerator();” type=”button” value=”Generate”>
</TD>
</TR>
<TR>
<TD></TD>
</TD>
</TR>
</TBODY>
</TABLE>
<SPAN id=”windowMarker”><B>Output:</B>
<BR />
<TEXTAREA name=”outputField” rows=”10″ wrap=”off” cols=”88″></TEXTAREA>
</FORM>
</body>
</html>