Hi, all
I am trying to use evalJSON with Ajax, but somehow it doesn't work.
for instance, I have a php file has the following output:
"name": "Violet", "occupation": "character"
and I have a html file with the following javascript:
new Ajax.Request('/some_url', { method:'get', onSuccess:
function(transport){ var json =
transport.responseText.evalJSON(); } });
alert (json.name);
by right, i should get an alert box displaying 'Violet' right?
can someone help?
thanks in advance. :)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---