Click to See Complete Forum and Search --> : Multi forms on a single web page??


dbair12
01-13-2003, 09:13 AM
I am attempting to use multiple forms on one web page. Eash form has a unique form name. I amnot sure how to use javascript to validate the different form(s).
Example of form tags:
<form name="formName1" method="POST" action="http://somethinghere.cgi" onSubmit="return checkForm(this.form)">>
<input...>
<input...>
<input TYPE="submit" NAME="submit" VALUE="Submit">
</form>

<form name="formName2" method="POST" action="http://somethinghere.cgi" onSubmit="return checkForm(this.form)">>
<input...>
<input...>
<input TYPE="submit" NAME="submit" VALUE="Submit">
</form>

<form name="formName3" method="POST" action="http://somethinghere.cgi" onSubmit="return checkForm(this.form)">>
<input...>
<input...>
<input TYPE="submit" NAME="submit" VALUE="Submit">
</form>

Thanks in advance for any help!

khalidali63
01-13-2003, 09:40 AM
instead of this.form in your function parameter use only this.
then you can access the form elements of the form where onclick /onsubmit event is triggered from.

hope this helps
Khalid

dbair12
01-13-2003, 07:05 PM
Thanks! With your help I finally figured out how to handle multiple forms on a single page.