...

View Full Version : Submitting multiple forms in the same call



Fush
08-16-2005, 11:12 AM
Hi!
I have a web page with several different forms in it. On certain occations, I would like to submit more than one of these forms. Something like this:




function submit_forms(){
document[formName0].submit();
document[formName1].submit();
document[formName2].submit();
etc...
}
This doesn't seem to work, neither in IExplorer nor FireFox. Only the last submit gets through, in the framework that I am running. Which other options are there, apart from merging all the forms into one big form?

thank you!

martin_narg
08-16-2005, 11:22 AM
This is not possible - you can only submit one form at a time.

Sorry!

m_n

iota
08-16-2005, 11:32 AM
Because the form action is same

napoleonv
12-23-2005, 12:00 AM
This works for IE. Not sure for any other browser. Please let me know if you find out.

<script>
function submitallforms() {
setTimeout('document.forms[0].submit()',100);
setTimeout('document.forms[1].submit()',200);
setTimeout('document.forms[2].submit()',300);
}
// End -->
</script>

<input type=button value="Submit" onclick="submitallforms();">

Napoleon N. Valdez
Senior Web Database Developer
Caspio, Inc.
Toll-free: (877) 820-9100 ext. 703
Local or International: +1.408.970.0500 ext. 703
Fax: 1.408.516.9925
Email: nvaldez@caspio.com
http://www.caspio.com



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum