Click to See Complete Forum and Search --> : Form Submit


kishore
01-14-2003, 05:26 PM
Hi Again
I have a feedback form in my webpage.On clicking the submit button it checkes all the validity e.g. no empty field,correct email address,no text field is left blank etc.If i keep the code as it is it's ok.But i want to move to a thank you page after submitting the values and all the values entered are collected in my email.The problem is, suppose i leave the name field blank then on submitting it gives an alert but after that it directly goes to the thank you page without checking for other validations.

<form name="feed" method="post" action="http://www.abc.edu/cgi-bin/mail?xyz@abc.edu" onSubmit="checkForm()" >

<input type="submit" name="Submit" value="Submit" onClick="final()">
<input name="Reset" type="reset" id="Reset" value="Reset">
<input type="hidden" name="next-url" value="http://www.abc.edu/eer/thankyou.htm">

Please suggest

khalidali63
01-14-2003, 05:31 PM
chagne this
onSubmit="checkForm()"

to
onSubmit="return checkForm()"

and make sure if all the requirements do no meet the function checkForm does not return true.

Khalid