But now I wish to update the content of that table on the fly. I understand I can use XMLHttpRequest() to fetch new data.
However, I do not know what format to use for those updates or how to insert the new data into the table.
I can supply the updates in XML. But can I re-use my existing XSLT template to parse it and repopulate the displayed table? This seems elegant and tidy but is it possible and if so, how would I do it?
If that's not possible, I suppose I could write the Javascript to parse the XML and update the table myself. That sounds like a lot of grunt work :-(
So I was also considering responding to the XMLHTTPRequest in JSON format. I think it may be easier to process JSON that it is to parse the XML.
But what should my JSON document look like and how do I write the JavaScript to process the JSON and repopulate the table?
Asumming I have a clean (error checked) response from XMLHttpRequest() what do I do here?
function ProcessUpdate()
{
}
I would prefer to avoid using any libraries such as jQuery for this project.
Bookmarks