Entry
How can I submit data from more than one form on a page?
Apr 25th, 2003 23:19
Nel MS, curt odar, Nel MS
You'd have to make 3 frames; 2 with 2 forms each, one contains a submit
button. Please note that you must have a working knowledge of
controlling framed pages with JavaScript.
(an example of INDEX.HTM page containing 3 frames, page1, 2 and 3)
|--------------------|
|Framed Page 1 |
|(containing Form1) |
|--------------------|
|Framed Page 2 |
|(containing Form2) |
|--------------------|
|Frame Page 3 |
| put your submit |
| button here |
|--------------------|
Your "submit button" placed in framed page 3 is going to be (i used a
normal button; javascript will do the form submission) :
<input type="button"
onClick="parent.frame1name.form1.submit();parent.frame2name.form2.submit
()">
P.S.: To write more than one JavaScript code into an event handler like
onClick, i've seperated it using semicolons [;]. See above.