!!HELP!! submit TWO form with ONE click !!URGENT!!

!!HELP!! submit TWO form with ONE click !!URGENT!!

when the visitor submit a form... the form usually sent to one cgi script [eg: sendform1.cgi]... but how can i make it to be able to submit to TWO cgi script [eg : both sendform1.cgi and sendform2.cgi] ???? remember the visitor only need to click once!! and after submit.. it will direct to a page that i specific!!!

PS: both sendform1.cgi and sendform2.cgi have pre-set a destination page after submit separately. Assume that I want the form will forward to the destination pre-set by sendform1.cgi

If your don't understand the suitation, ask me!! If you have any idea, please also tell me!!

It is very urgent!!
Thanks a million!!

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Four choices:

1) Have the first cgi generate a page that contains:
<body onLoad=second.submit()>
<form name=second action=http://secondform.cgi>
This does require a JS enable browser

2) have the first script generate:
Location: http://secondscrip.cgi\n\n

3) first script generate, in its result:
<meta http-equiv="refresh" content="0; url=http://secondscript.cgi>

4) Only required if you can not modeify either of the scripts to do the above:
have the submit button invoke a new page that has two frames or windows, where each is loaded with the first or second script.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
I should add that the reason that these games are required is that the http protocol only supports one connection at a time so one page can not invoke two scripts, without playing these games.

So, eiher do them in sequence, solutions 1,2 and 3 or concurrenbtly by making a second page with option 4.
With Proposed Answer, you can make first script to return this two lines (2nd line must be empty):

Location: secondscript.cgi?variable=value&var2=val2\n\n

You need to put there all variables that needs secondscript and values entered by user in first form.
This will call 2nd script automaticaly
and as a result browser will go to url returned by secondscript.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.