Web Teacher Software
web database
Javacript 
Tutorial
CGI tutorial
web 
database consulting
web database training
contact us about web 
database software
press
Hosted Database Solutions
webteacher home
Web Teacher Consulting

javascript tutorial graphic


Webteacher Software now offers

We ended the description of the form button with:

onClick="MsgBox(form.text1.value)"

This means when the user clicks on this button, the program should run the MsgB ox function from the top of the page, and use the value of the form object named text1 as its variable.

huh?

OK, there are 2 objects in the form, a text box and a button, right? Each object has a name, and the text box is named text1. The text box's full name is form.text1. The number of characters typed in the box is called form.text1.length. The value, or string of text that was typed is called form.text1.value

If this is getting too jargon-ish for you, just remember that you end your "submit" button with
onClick=function(form.textboxname.value) where function and textboxname will be substituted.


That's it! The value of text1 gets passed to the MsgBox function; the MsgBox function passes it to the Alert command; and the alert command displays your text for all to see!

On to Chapter 2

Home | WebData - Web Database Software | Javascript | CGI | Consulting | Map Builder | Contact Us | The Press Room