"Matt" wrote in message news:ej******** ******@TK2MSFTN GP10.phx.gbl...
: Can form.submit() submit another form? In the following example, in
: page1.asp, it is fine to submit the current form: form1.submit(), and and
I
: could see the value "Joe" in page2.asp. However, if I do: form3.submit(),
: then it couldn't go to page2.asp. Any ideas?? Thanks!!
:
: //page1.asp
: <html>
: <head>
: </head>
: <body onload="form1.s ubmit()"> //OK!
: <!-- <body onload="form3.s ubmit()"> //Doesn't work!! -->
: <form name="form1" action="page2.a sp" method="post">
: <P><input type="text" name="fname" value="Joe">
: </form>
: </html>
:
: //page2.asp
: <%= Request.Form("f name") %>
:
: //page3.asp
: <form name="form3" action="form2.a sp" method="post">
: <P><input type="text" name="fname" value="Joe">
: </form>
Right. You cannot submit form3 from page1.asp. You submit the form from
the page you are on. Even if you call a form on an open page, you are
submitting from that page.
If page3.asp was a popup and had a handle of page3, then you could call for
the form to submit from page1.
page3.document. form3.submit()
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center -
http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation -
http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library -
http://msdn.microsoft.com/library/default.asp