Solved

Submitting Two Forms with one click

Posted on 1997-07-10
2
163 Views
Last Modified: 2006-11-17
Is it possible to send two forms with one click?
0
Comment
Question by:6100
2 Comments
 
LVL 5

Accepted Solution

by:
icd earned 50 total points
ID: 1268405
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
 
LVL 1

Expert Comment

by:pmcintos
ID: 1268406
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now