Using Forms for Output
This is the final approach to Output. Generally speaking, you can't change the contents of
a page after it has been written. Using this approach your CAN! Unfortunately you can only
change the contents of a "Text Field", but that should be
sufficient for most applications. In this example the contents of a Text Field
is changed when a button is pressed.
Click in the "Result" column to see how the change operates. When you have finished remember to close the Sub Window.
| HTML/JavaScript Code | Result |
| <BODY> <FORM NAME="test"> <INPUT TEXT="InText" NAME="Sample" SIZE="25" VALUE="Original"> <INPUT TYPE="button" VALUE="Press here ..." onClick="document.test.Sample.value = 'changed';"> </FORM> </BODY> |
Click here to open the Sub Window... (Remember to close the Sub Window) |
NOTE: The text appearing in the 'box' could be text, a
variable, or the result of a a calculation.
<- Back - Menu - Next
->