543Chapter 23 .The Form and Related Objects A (Web site layout)
543Chapter 23 .The Form and Related Objects A common practice, especially with a long form, is to provide a button that enables the user to return all the form elements to their default settings. The standard Reset button (a separate object type described in Chapter 24) does that task just fine. But if you want to clear the form using script control, you must do so by invoking the reset()method for the form. More than likely, such a call is initiated from outside the form, perhaps from a function or graphical button. In such cases, make sure that the reference to the reset()method includes the complete reference to the form you want to reset even if the page only has one form defined for it. On the CD-ROM Example (with Listing 23-3) on the CD-ROM Related Items: onReset event handler; reset object. submit() Returns: Nothing. NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility . . . The most common way to send a form s data to a server s CGI program for processing is to have a user click a Submit button. The standard HTML Submit button is designed to send data from all named elements of a form according to the specifications listed in the