• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Adding row dynamically and sending all rows value to servlet

 
Deepak Vasanth
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I created a table having 3 columns.
Each column contains text box to enter values.On clicking Add button,A new row with 3 text box is generated.You can click Add button any number of times.

My Question is how to send the values of text box(rows value) to servlet on clicking Save.

Thanks,
Deepak
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Deepak Vasanth,
Welcome to Javaranch.

I'm going to move this question to our HTML/Javascript forum since this is more a client side issue than a server side one.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you post the form, doesn't all of your text fields go up to the server?

Eric
 
Deepak Vasanth
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yaa true, all values is going to server side, but how to retrive all the values with respect to row number i mean in a sequence.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do it by working the row number into the field name.

first_name_1, first_name_2, etc...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic