• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Three forms in jsp page

 
Yog Ananth
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If all three forms are to be submitted and you only have one submit button, why are you using three forms not one?
 
krishnaraj sg
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64720
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to HTML/Javascript.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic