aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes HTML Table as XML File using JavaScript 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 "HTML Table as XML File using JavaScript" Watch "HTML Table as XML File using JavaScript" New topic
Author

HTML Table as XML File using JavaScript

Abdul Kader
Ranch Hand

Joined: Apr 11, 2007
Posts: 115
Hi Guys,

I like to know how I can send all the cells in a HTML table to the Server side. The Html table will increate dynamically with a different data. Initially i thought of getting all the cells using DOM and appending into a single String. However this will be high error porn. So I am planning to make them as XML file. Is there any code available which I can use to generate XML file for my Table using JavaScript.

I will great if you have any inputs for me. Please let me know if you have any comments.

Thanks in advance
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You will have to be generating a string with JavaScript. Better solution is to post hidden fields with the values and do a normal form submission.

Eric
Abdul Kader
Ranch Hand

Joined: Apr 11, 2007
Posts: 115
Is there any better option rather than find & replace or Hidden fields. I feel their will be some option available in the HTML. let me know please.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61434
    
  67

It makes no sense to try to do this on the client. Why are you adverse to a simple submit where the server handles the data?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
jQuery in Action, 2nd edition
 
subject: HTML Table as XML File using JavaScript