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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

submit to two forms simultaneously

Status
Not open for further replies.

yeltom

Programmer
Sep 17, 2001
62
US
Hi, I would like to know if possible how to submit to two asp pages using a single form.
 
I don't believe you can but a simple redirection tot he second page after the first is processed should do the trick.. _______________________________________________
{ str = "sleep is good for you. sleep gives you the energy you need to function";
ptr = /sleep/gi;Nstr = str.replace(ptr,"coffee");alert(Nstr); }

_______________________________________________
for the best results to your questions: FAQ333-2924
has you're questio
 
I also have this problem - I need to submit 4 forms to 4 different servers.
As I understand to submit a form you need to click on Submit button.
In case of redirection what would be the way of triggering the submittion of other forms?

Thanks
 
you can do this using javascript.Lets say there are 3 forms in the page form1,form2 and form3

create a function first

function subm()
{
window.document.form1.method="post";
window.document.form1.action ="sub1.asp";
window.document.form1.submit();

window.document.form2.method="post";
window.document.form2.action ="sub2.asp";
window.document.form2.submit();

window.document.form3.method="post";
window.document.form3.action ="sub3.asp";
window.document.form3.submit();
}

then the submit button should be written as such

<input type=&quot;button&quot; onClick=&quot;subm();&quot; value=&quot;Submit&quot;>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top