NYCPHP Meetup

[nycphp-talk] PHP to ajax variable passing problem

csnyder chsnyder at gmail.com
Thu Aug 9 15:46:03 EDT 2007


On 8/9/07, Cliff Hirsch <cliff at pinestream.com> wrote:
>
>  As usual, figured it out minutes after my post. Answer for the group:
>
>  From: var output = req.responseText;
>  To:     var output = eval('('+req.responseText+')');
>
>  Better answer — don'tr try to reinvent the wheel. Yeah but we can't help
> ourselves. Xajax looks very cool....


Yes eval(), which always makes me a little queasy, even though I know
it's relatively safe. I wonder how many years we'll be waiting for a
true json_decode() function to make it into general circulation?

-- 
Chris Snyder
http://chxo.com/


More information about the talk mailing list