I wish to return 3 items in one XMLHttpRequest call. The items are one HTML formatted table and two JSON data for Google Charts. The reason is that the charts data cannot be generated unless the table is generated first and I wish to update everything in the page at once.
I could not find anything relevant on the net. I thought of using hidden variables in the returned HTML to contain all the information or a text with delimiters.
If there is a better idea I would welcome it and many thanks in advance.
Cyril
One Request == One Response
If you want to include multiple pieces of data in that response then you need to encode them.
The simplest option, especially since you are already dealing in JSON, would probably be to use a JSON text.