File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Three forms in jsp page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Three forms in jsp page" Watch "Three forms in jsp page" New topic
Author

Three forms in jsp page

Yog Ananth
Greenhorn

Joined: Dec 28, 2004
Posts: 27
i am having three forms one after the other in a jsp/html page. first form contains 2 textboxes, and second form contains two text boxes, third contains a a textbox and submit button, if u click the submit button, all the three form r to be submitted.


thanks in advance

Yoga
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

If all three forms are to be submitted and you only have one submit button, why are you using three forms not one?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
krishnaraj sg
Greenhorn

Joined: Apr 29, 2005
Posts: 17
hi,

i support Paul Sturrock comments...but still if u want to submit...

u can go ahead with

document.firstformname.submit();
document.secondformname.submit();
document.thirdformname.submit();

all the 3 forms gets submited....
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by krishnaraj sg:

document.firstformname.submit();
document.secondformname.submit();
document.thirdformname.submit();

all the 3 forms gets submited....

As soon as the first one gets submitted, the browser stops executing.

I think a better approach would be to rethink your design.
Why do you need the fields to be in three different forms?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61206
    
  66

Moved to HTML/Javascript.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Three forms in jsp page