reading html table in servlet


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: reading html table in servlet

  1. #1
    Join Date
    Aug 2008
    Posts
    20

    Question reading html table in servlet

    Dear Members :

    I have a table populated in servlet, with one column as "delete button".
    This button when clicked, the row gets deleted and this code is written in a Javascript file. After user alters the table (deleting rows), a checkout button below the table is clicked, and user would be taken to another page (displaying summary info collected from modified table).

    When checkout button is going to submit the modified table to another servlet, how this servlet is going to read the modified table ?
    Simply put, how a servlet can read (row,cell) of an html table ?

    Thanks in advance.
    Atanu

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    One way to store values from an HTML page is to submit them to the server using an HTML form. Can you arrange for the elements to be part of a form?

    An alternative would be to collect all the data values as GET parameters in an URL, and to send that to the server via JavaScript. Using GET for a save operation is generally frowned upon, though. Using a POST from within a form would be cleaner.
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  3. #3
    Join Date
    Aug 2008
    Posts
    20

    Red face

    Thanks Hack.

    I got a solution in another forum, who suggested me to get the elements of html table by "name" thru getParameterMap() method (receiving servlet).

    This will work fine. I am also trying to materialize this algo - "clicking checkoutbutton, call a JScript, which will read all the elements (modified) of the html table, put them in array and send to the receiving servlet"; but I am lacking at the syntax level (I am just learning servlet).

    If you think this can be done and worth doing, could you please send a summary syntax : both at JScript and receiving Servlet level.

    Thanks very much.
    Atanu

Similar Threads

  1. extracting a table from a html web page
    By bob1983 in forum Java
    Replies: 2
    Last Post: 02-28-2006, 03:27 AM
  2. Replies: 0
    Last Post: 05-28-2003, 12:11 AM
  3. How would u do it (design question) ?
    By Joe in forum Database
    Replies: 17
    Last Post: 04-04-2003, 05:55 PM
  4. reading asp / html
    By khaimun in forum ASP.NET
    Replies: 1
    Last Post: 09-07-2000, 12:59 PM
  5. Replies: 1
    Last Post: 06-20-2000, 01:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center