Hi,
I am new to AJAX. Can anyone please help me how to populate a table with data that comes after AJAX request in the form of XML. I mean how to populate the HTML table dynamically from javascript.
Thanks in advance..
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
6
posted
0
Well you have insertRow and insertCell or createElement and appendChild
Loop through the responseXML and use those things I mentioned above.
If you a new and are just practicing, then it would be a lot better if you could change your server side code to return formatted HTML which you could just directly use - with something like document.getelementById("myDiv").innerHTML = response.text().
You might also consider starting with a java script library like Jquery which would save you a lot of hassle which browser compatibility issues.
DWR is interesting, but it imposes a whole different way of working than anyone is used to in JavaScript. I'd not recommend adopting it just for Ajax usage.