On 8/9/07, Dell Sala <[EMAIL PROTECTED]> wrote:
>
> json.org provides a json decoder for javascript. I've always used
> this instead of eval. This will only parse the json subset, and will
> fail for other arbitrary javascript.
>
> http://www.json.org/js.html
> http://www.json.org/json.js
>
That s
I have been hooked on jQuery. AMAZING JS stuff. There is an
ajax/form plug in that will handle all this. Serialize, JSON, zillion
options. Mixing it all up with php, and you can do pretty much
anything.
http://jquery.com/
Plug in examples:
http://www.malsup.com/jquery/form/#code-samples
:-)
On Aug 9, 2007, at 3:46 PM, csnyder wrote:
On 8/9/07, Cliff Hirsch <[EMAIL PROTECTED]> 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+')');
Yes eval(), which always makes
On 8/9/07, Cliff Hirsch <[EMAIL PROTECTED]> 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 he
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:
>>
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...
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