• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTML Table as XML File using JavaScript

 
Abdul Kader
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64994
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic