Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multiple forms on one page

Status
Not open for further replies.

newtoASP

Programmer
Jun 1, 2001
40
US
I have 2 forms on one page, one is inside the other and attatched to a select box.
<form1...>
<form2...><select onchange=form2_submit>...</select></form>
<some input boxes>
</form>
The onchange of the select box calls a sub that does:

sub form2_submit
documnet.form2.submit
end sub

Is it possible to do this? I keep getting an error stating object does not support this method 'document.form2'

The id of the form attatched to the select box is form2.
Thanks in advance - Greg
 
First of all, do not put a form inside another form, very bad practice. Also use
Code:
document.forms[&quot;form2&quot;].submit()
, the other way will not work with Netscape. Wushutwist
 
Thanks for the response. I separated the select box and the embeded form outside of the main form and placed a hidden input box within the main form containing the value of the select box in the other form. Seems to do the trick.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top