Link to home
Start Free TrialLog in
Avatar of 6100
6100

asked on

Submitting Two Forms with one click

Is it possible to send two forms with one click?
ASKER CERTIFIED SOLUTION
Avatar of icd
icd

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pmcintos
pmcintos

You can use a frame maker page that divides the page up into two frames:   make one frame 100% width or height whichever you are doing....
Submit form #1 in the visible frame (that is the 100% sized one )
Submit form #2 in the invisible frame
Make it so the response from the appropriate form is submitted in the visible frame.
This will in effect submit one of the forms in the background...


Oh yeah....how to submit them both on the same click.  Have them click the submit button for one of the forms.  Give this form the event
onSubmit=" return myfunction()"
now here is the function:
function myfunction() {
  document.thesecondformname.submit();
  return true;
}

now straight above the second form write in the line:
<base target="parent.hiddenframename">
This will rifle this form off with the response directed at the hidden frame.  I hope this helps you...
The answer above doesn't seem to be very specific...
if you want any further explaination just comment this question and I will come check it out.

Pete