Kevin Leitch's Blog:
Splitting Ajax Returned Data
On Kevin Leitch's blog, there's this new post about his effort to use as much Ajax as is sensible in a new product site for his company. In the process, he has discovered a "more refined way" to use innerHTML.

Lets say I have data I need to return from a PHP script that I need to funnel into separate markup elements when they�re returned to the page. How to do this perplexed me for awhile � my experiences of innerHTML was that results are returned in a big chunk.

Basically, he creates a solution where the data passed back (in this case, from a PHP script) is in a "splitable" format using the javascript .split function. Then, it's just a simple matter of using the first value as the key for the array, and the second as the data...

Share your thoughts on "Splitting Ajax Returned..." (0 comments)



<< Have a commment to share? Speak up now! >>


 All content copyright, 2005 AjaxDeveloper.org :: [email protected]