Is it possible to have multiple forms on one page and then submit them
all with one button?
(IE only solution is ok).
I saw some guy trying to use
for(var i = 0; i < document.forms.length; i++)
document.forms[i].submit();
I don�t find it very surprisingly it doesn�t work. It seems this would
post all the forms, one at a time, to their (in this case the same)
action. (Like them having one submit each and you are fast enough to
click each of button.)
He was tipped to use enctype=�multipart/form-data�, which I know is used
for file uploads. But this should only affect one form (right?).
Or could I have a �multipart/form-data�-request consisting of several
forms?
How would you do that?
The whys:
The alternative to using multiple forms (still one Submit) would be
unique field names. If I have many similar fields (rows with the same
fields) I could use unique fieldnames (<imput name=�id_1�), but I�d have
to extract each field in our business logic. If I have multiple forms
(or some kind of namespace) I could extract each form in my controller
and call the business logic for each form.
Pseudo code:
businessLogic( rowForm1.parameters );
businessLogic( rowForm2.parameters );
Could this be solved in any other way?
(For the moment we have one form with individual submit per row)
Mattias Jiderhamn
Expert Systems
[EMAIL PROTECTED]
�
==========================================================================To
unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets