- Send data to be stored in the DB (no response)
- Refresh an information panel on the screen (e.g. HTML response)
- Refresh a different area of the screen (e.g. HTML response)
All this server-side stuff is fine, I have most of it in place with the current setup, but I'm wondering what the best option would be to send the data back to the client? As far as I can see, there are two options available - JSON and XML. Is anyone aware if there is preferred data format, and whether there are issues with either one that needs to be considered? Does encoding come into it at all? What happens if one of the HTML packets contains a special JSON/XML character/phrase, such as } or </end_of_my_xml_element>.
Also, once the package is received by the client, the scripts will need to be evaluated. I'm guessing the eval() function is the way to go, but have never used the function myself, and am aware there is a field of thought that eval is "bad". Can anyone shed light on whether this is a good/necessary use of the eval function? To me, it looks like it is.