[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 196
  • Last Modified:

Submitting Two Forms with one click

Is it possible to send two forms with one click?
0
6100
Asked:
6100
1 Solution
 
icdCommented:
It is possible to send two forms in two separate frames with one click but not two forms in the same frame. To do so would mean a conflict since which script should output to the current frame?

0
 
pmcintosCommented:
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
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now