Is there a way of submitting more than one form( but using only one submit button). I've tried document.all.forms.submit() and also
document.forms.submit(), but neither do the trick.
hi rumbler,
I'm not completely sure about it, but if you want to submit all forms at once use this:
function submit_all() {
for (n=0; n<document.forms.length; n++)
document.forms[n].submit();
}
If you want to submit some particular forms (but not all of them), use this:
function submit_all() {
document.forms[1].sibmit();
document.forms[3].sibmit();
}
call this function from any button or link on your page:
<. . . onclick="submit_all()">
An off-topic issue:
don't use document.all structure as it's IE-only.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.