function thePage(page)
{
document.daform.receiver.value=("You chose " +page+ ".");
document.bgColor=page;
}
</SCRIPT>
<h3>The Information you Requested...</h3>
<FORM NAME="daform">
<center><INPUT TYPE="text" SIZE="40" name="receiver"></center><P>
<INPUT TYPE="button" VALUE="Blue" onClick="thePage('blue')">
<INPUT TYPE="button" VALUE="Yellow" onClick="thePage('yellow')">
<INPUT TYPE="button" VALUE="Green" onClick="thePage('green')">
</FORM>
Gives you this:
See how the text got into the text box? We're passing up what the user chose.