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 Adding row dynamically and sending all rows value to servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Adding row dynamically and sending all rows value to servlet" Watch "Adding row dynamically and sending all rows value to servlet" New topic
Author

Adding row dynamically and sending all rows value to servlet

Deepak Vasanth
Greenhorn

Joined: Nov 21, 2007
Posts: 5
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

Joined: Dec 11, 2004
Posts: 13410

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.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
If you post the form, doesn't all of your text fields go up to the server?

Eric
Deepak Vasanth
Greenhorn

Joined: Nov 21, 2007
Posts: 5
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

Joined: Dec 11, 2004
Posts: 13410

I do it by working the row number into the field name.

first_name_1, first_name_2, etc...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Adding row dynamically and sending all rows value to servlet