I'm not great with Javascript and I know next to nothing about Json, but I know responseText will return a string, and PHP will output a string, so you need to use javascript to use javascript to take the string and un-serialize it (I don't know if this is technically un-serializing or not, but... make an object out of a string) So... yeah.. javascript issue for sure. Hope someone else can help you more (and I'd like to know the answer too for my own education)
-Tom On 8/9/07, Cliff Hirsch <[EMAIL PROTECTED]> wrote: > > My Ajax response handler uses this line, which is fairly typical: > > var output = req.responseText; > > >From php, I'm echoing back json. Example: > {"status":1,"count":0,"data":""} > > But instead of var output being an object, it is a string: > "{"status":1,"count":0,"data":""}" > > How do I make this an object? > > Cliff > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php >
_______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php