Universal Related Popup Menus / Conditional Submit
Universal Related Popup Menus
The Submit button has the special function of submitting a form to the server. This event handler may add any additional functionality to the Submit button. In Navigator 2.0, there is no way for this onClick() event handler to cancel the submit action or to prevent the form from being submitted; use the Form.onsubmit() event handler to prevent input validation and to cancel form submission if necessary.
In Navigator 3.0, the onClick() event handler may return false to prevent the Submit object from submitting the form. - page 536
The way to cancel a submit button is through the onSubmit() event handler.
...if the data is not valid, the onsubmit() handler may cancel form submission by returning the value false. - page 410.
<FORM ... onSubmit="return false">
<FORM NAME="f1" METHOD="POST" ACTION="/cgi-bin/redirect.cgi" onSubmit="return false"> <SMALL>Pick a topic:</SMALL><BR> <SELECT NAME="m1" onChange="jmp(this.form,0)"> <OPTION VALUE="/3d/">3D Animation <OPTION VALUE="/dlab/">Design ... </SELECT><INPUT TYPE=SUBMIT VALUE="Go" onClick ="jmp(this.form,0)"> </FORM>
Comments are welcome
Created: Mar. 10, 1997
Revised: Feb. 12, 1999