I don't get it. If you're processing all the data on the next page, why go through all this? Use one form.
I can see where this might be useful if three sets of data were being sent to three different servlets. Can that be done? Greg -----Original Message----- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Be Fair Sent: Thursday, May 16, 2002 2:19 PM To: [EMAIL PROTECTED] Subject: Re: multiple HTML Forms You can set all the submit buttons to trigger a java script function. In that java script function, copy all data from all three forms to the forth form, then submit the forth form. In the 4th form, create total number of fields (from all three forms) in hidden format. <SCRIPT LANGUAGE="JavaScript"> function finalSubmit() { document.form4.text1.value = document.form1.text1.value; document.form4.text2.value = document.form2.text1.value; document.form4.text3.value = document.form3.text1.value; document.form4.submit(); return false; } </SCRIPT> <FORM NAME="form1" onSubmit="return finalSubmit()"> text1: <INPUT TYPE="text" NAME="text1"> <INPUT TYPE="submit" VALUE="Submit" onClick="finalSubmit()"> </FORM> <FORM NAME="form2" onSubmit="return finalSubmit()"> Enter some text: <INPUT TYPE="text" NAME="text1"> <INPUT TYPE="submit" VALUE="Submit" onClick="finalSubmit()"> </FORM> <FORM NAME="form3" onSubmit="return finalSubmit()"> Enter some text: <INPUT TYPE="text" NAME="text1"> <INPUT TYPE="submit" VALUE="Submit" onClick="finalSubmit()"> </FORM> <FORM NAME="form4"> <INPUT TYPE="HIDDEN" NAME="text1"> <INPUT TYPE="HIDDEN" NAME="text2"> <INPUT TYPE="HIDDEN" NAME="text3"> </FORM> >From: "Boddula, Sridhar" <[EMAIL PROTECTED]> >Reply-To: A mailing list about Java Server Pages specification and >reference <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: multiple HTML Forms >Date: Thu, 16 May 2002 13:11:08 -0400 > >Hi, > >I have a jsp page. In that page i have 3 HTML forms and each one is having >submit button. If I click any submitt i need to send all the three forms. > >Could any one tell me how can I submit multiple forms in one submit. > > >I appreciate your help, > > >thanks, > >Sridhar Boddula > >=========================================================================== >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://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com _________________________________________________________________ Join the world�s largest e-mail service with MSN Hotmail. http://www.hotmail.com =========================================================================== 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://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com =========================================================================== 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://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
