|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
All right here's my plan. I am creating a form and i want it so that when someone pushes the submit button it does its thing and then loads a new page. I have a feeling this is done with the onSubmit command. but i am an amateur at javascript and require help. Thank you all!
------------------ Justin Steinfadt - aka Lt.Cmd.Data |
|
#2
|
|||
|
|||
|
<HEAD>
<SCRIPT language='javascript'> function validate (frm) { // form validation code goes here // for example: var retval = 1; if (frm.City.value != "Venice") { alert ("Wrong"); retval = 0; } // And so on. return retval; } </SCRIPT> </HEAD> <BODY> <FORM method=post action="nextpage.html" onSubmit="return validate(this);" > <P>In what city is the Grand Canal located?"</P> <INPUT type=text name="City"> <INPUT type=submit value="Enter"> </FORM> </BODY> |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > I can't work the onSubmit Command |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|