Chapter 8: Using Forms
HTML forms and their elements, such as command buttons, radio buttons, text boxes, and the like, are a standard feature on many Web pages. This chapter describes ways to manipulate these objects with VBScript.

Using a command button
The command button is one of the most-often used form elements. Page 90.

Using check boxes
Check boxes are used to denote whether particular options are selected. A check box that is "checked" is considered selected. Pages 91-92.

Using radio buttons
While similar to check boxes, radio buttons give you a way to group a set of mutually exclusive options together so that the user can pick one choice from a set. Note: I had to change this example because of changes to the Dynamic HTML (DHTML) Document Object Model (DOM) in IE 5.0, which does not support a count property for the element object anymore. Page 93.

Using a text box
A text box allows the user to enter a single line of text into a form. This example explores four events exposed by this element. Page 94.

Using a text area
If you need more than a single line of text, then a text area fits the bill. Page 95.

Using a list box
For some reason, HTML refers to a list box as a select element or, even more erroneously, as a "menu". Regardless, this element is used to present a list of options to the user. Note: The version shown here is different from the one in the book, again because of changes to the DHTML DOM. Page 96.

Submitting a form
Ultimately, the purpose of most forms is for user information to be sent along to a Web server for further processing. This is known as submitting a form. Pages 97-98.

Validating a form
VBScript makes it easy to validate data submitted by a form before it goes to the server, conserving bandwidth and making your sites run more efficiently. Pages 99-101.


All content © 1997-1999 Paul Thurrott