[Webinar] Streamline your web hosting managementRegister Today


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

Posted on 2000-01-22
Medium Priority
Last Modified: 2013-12-25
!!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!!

Question by:CYBERWORLD
  • 2

Accepted Solution

jhurst earned 100 total points
ID: 2378510
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.


Expert Comment

ID: 2378514
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.

Expert Comment

ID: 2395589
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.

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question