473,756 Members | 4,863 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

can form.submit() submit another form?

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>
Jul 19 '05 #1
2 5550
"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

Jul 19 '05 #2
hi, with popup window opener with window.open you can use this too:
window.opener.f rmX.submit();

regards,

««««««««»»»»»»» »»»»»»»
Vlmar Brazão de Oliveira
Desenvolvimento Web
HI-TEC
"Roland Hall" <nobody@nowhere > escreveu na mensagem
news:eK******** ******@TK2MSFTN GP12.phx.gbl...
"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

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5750
by: monika | last post by:
hi ... I have an asp page which has 3 buttons. <p align="center"><input class="button" type="button" onClick="location='welStudent.asp';" value="Click to write a new story"></p> <p align="center"><input class="button" type="button" onClick="location='draftedStory.asp';" value="Click to complete the drafted story"></p> <p align="center"> <input class="button" type="submit" value="Click to view your grade sheet" name="submit"> </p>
2
73379
by: Terence Parker | last post by:
How does one go about submitting a form with a link - but submitting it to a new window AND to a page different to that described within the action="" option of the <form> tag? Say, for example, I have a simple form such as the following: <form method="POST" action="submit.php" name="AForm"> Name: <input type="text" name="Name" length="20"><br> Age: 15 <a href="age.php">change age</a><br> <input type="submit" name="submit"...
4
7794
by: Sarah | last post by:
Hi all. I have a form, and several text and image links on it that should submit the form with different actions. I prepared a simple page with just the code that's not working. PROBLEM: The form won't submit if the link is clicked, but will submit if the SUBMIT button is clicked. I need to call a function to change the form's action according to user's input before it is submitted.
15
6576
by: M Smith | last post by:
I have a form I want to submit to itself. I want to be able to type in a list of numbers and submit the form and have that list show up on the same form under the text box I typed them into and the buttons. The problem is when I post a form to itself, the Enter key will not submit the form, it only clears the contents of the text box. The only way I can submit is to click the submit button. Here is a simplified version of my code that I...
6
3106
by: CJM | last post by:
Can somebody clarify if/how/when a simple form is submitted when the <Enter> key is pressed? As I understood it, if you have a form with a single submit button, if enter is pressed, the form should be submitted as if the button is pressed. Is this correct? Does this behaviour vary across browsers? Chris
4
9301
by: Stuart Perryman | last post by:
Hi, I have the following code which works just fine in IE6 but not in Firefox. It is an extract of several table rows each with an individual form. It is generated by php. <form action="MaintNotification.php?ReqID=5" method="post" name="frm5"> <tr align="left" bgcolor="#dddddd" class="text" onClick="submit()"
5
8449
by: rjames.clarke | last post by:
I have the following. $result=mysql_query($sql); $nrows=mysql_num_rows($result); for ($i=0;$i<$nrows;$i++) { $row_array=mysql_fetch_row($result); echo "<form name='testform' action='ins_op.php' method='post'>"; lots of form stuff
5
17713
by: Navillus | last post by:
Hey gang, I have a login form that is empty by default, but can be filled with values from a previous form: <input type=text maxlength="40" size="40" name="user" value="`usr`"> <input type=password maxlength="8" name="password" value="`pss`"> where usr and pss are sent from the previous form.
1
10825
by: gbezas | last post by:
Hi All, I have added an event handler to redirect form.submit() to a newSubmit() method that I have defined (which does some additional processing before submitting the form). Additionally I have defined the relavant function method in the code for details) The issue is that when Icall targetForm._submit() method from the newSubmit() function the page I get an 'Object doesn't support this property or method' error I am using IE...
0
9152
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9930
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9716
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9716
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8569
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7116
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6410
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5180
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2542
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.