Yes - well - it does depend on what you want to do with the data when you get it back onto the Browser.
If all you want to do is just display it inside a DIV as it is sent back then I would not bother using JSON. Just get the XML packet that comes back from your XMLHttp call and dump it into the DIV.
But, if you want more control over the information programmatically once you get it to the Browser, then you should parse all the text off (I assume it is HTML - or XHTML - or some markup language) and break it down into arrays and structures that you describe using JSON. Then send THAT back in the XML packet, run eval() on it in your JS code, and the full variable will be declared.
Other than that, you are on your own as to how you need to implement things in your specific case.
That said, JSON is VERY simple to understand and is a notation that is used in similar fashion across other languages to initialise data. The difficulty is learning how to apply it to specific problems.
Regards,
Gary
On 6/29/05, Mark Ireland <[EMAIL PROTECTED]> wrote:
Anyone up to speed on JSON and cfAjax?
I ask because I want a page that deals with data that will ultimately be
served like a document.
I think my data will be a list of UUIDs and my document will be text,
paragraphs, breaks, links, imgs, forms, labels,fieldsets, headings, bold,
italics and I think thats it.
_________________________________________________________________
Sell your car for $9 on carpoint.com.au
http://www.carpoint.com.au/sellyourcar
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/
--- You are currently subscribed to cfaussie as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
