Only a single form can be submitted from a web page. There are a number of ways to deal with this including popup the submit response (ugly) or use AJAX to 'Post' the form data, I suggest you consider ways to get your multi-form in a single entity. HTH
Kal.
Kalagoo.Com Specialist SEO and SEM management. Independent Project Development/Technical Management, Web Consultancy, Specialist Online Marketing
Actually, it is possible to submit multiple forms, as long as the target for each form is different.
Like this...
<form id='form1' name='form1' action='firsttarget.htm' target='_blank' method='POST'>
--your form fields--
</form>
<form id='form2' name='form2' action='secondtarget.htm' target='_self' method='POST'>
--your form fields--
</form>
Then, rather than a submit button, a link like this...
<a href='javascript:doit()'>Click Here To Submit Both Forms</a>
And in the header...
<script language='javascript'>
<!--
function doit()
{
document.form1.submit();
document.form2.submit();
}
-->
</script>
When you click, it will submit the first form to a page that opens in a new window, and the second form to a page that opens in the current window.
Or you could use iframes...
<iframe name='if1' id='if1' src='firsttarget.htm' border='0' frameborder='0' scrolling='auto' width='240' height='680'></iframe>
<iframe name='if2' id='if2' src='secondtarget.htm' border='0' frameborder='0' scrolling='auto' width='240' height='680'></iframe>
And in the forms, target='if1' and target='if2' respectively.
In this case, when you click the submit link, it will send the data from the two different forms to the two iframe areas on your page.
The only caution is that your field names in both forms must be unique... that is, you can't have name='firstname' in the first form, and name='firstname' in the second form too.
I hope this helps.
CTB
Last edited by chestertb; 03-29-2006 at 01:33 AM.
Oh Lord, please help me be the person my dog thinks I am.
What needs to happen now is I need to make sure fields in one of the forms are filled out. I've found javascript validation scripts but they rely upon "onSubmit" at the end of the form, which this script does not use.
Hello,
How can one submit multiple forms at a time. At the same time the values must get Forwarded another page.
Please help me out of this a.s.ap.
I have a similar problem:
I want to search in one run but giving a window with 3 tabs/targets:
{ {john, mary}, {john, sue}, {john, girl} }
and a minute later
{ {pete, mary}, {pete, sue}, {pete, girl} }
and continue with different boy names but the same girl names.
The request page may differ or remain constant.
The result pages with their 1boy&3girl specs/targets/tabs should differ.
Bookmarks