HTML_AJAX + JSON

From: Date: Sun, 05 Feb 2006 03:50:31 +0000
Subject: HTML_AJAX + JSON
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-22791@lists.php.net to get a copy of this message
I want to convert my AJAX application to use HTML_AJAX. Here's how I have things set up right now (pre HTML_AJAX): 1. Manually create a GET request 2. Submit it using XMLHttpRequest 3. Process it using PHP and convert the results to JSON 4. eval() the JSON in a callback function and operate on the results Can someone point me at an example showing me how to do this using HTML_AJAX? All the examples I can find generally assume you're sending back HTML and want to shove it into a div. I don't want this because I want to be able to manipulate the data on the client w/o refetching it from the server. (I also need to be able to pass parameters to the server.) I feel HTML_AJAX should be able to handle the JSON (de)serialization for me and let me operate on it within a callback, but I'm not quite sure how. Thanks. -adam -- adam@trachtenberg.com | http://www.trachtenberg.com author of o'reilly's "upgrading to php 5" and "php cookbook" avoid the holiday rush, buy your copies today!

« previous php.pear.general (#22791) next »