need advice
Hello,
Thanks to the authors for all your help!
I've another one for you:
I have a periodic refresh on my page. The responseText is HTML and I load it directly into a div....I figure this is faster than parsing XML.
However, now I would like that responseText to also return some parameters, to give me status information.
What is the best way to do this:
1. Combine the HTML code with the parameters and separate them with a delimiter like "||". Then use split and break them apart and load the HTML straight into the div. (This is kind of ugly, and could cause problems if the delimiter was located in the HTML)
2. Change it so that it's XML and that I parse the XML. I won't get the savings of just loading the straight HTML into a div anymore though. Then I could load the status information in there, as well as the data for the HTML.
p.s. I've decided to use XML instead of JSON. I tried JSON and the library I got from json.org has errors in it. I feel more comfortable with XML for a lot of reasons.
|