I hope this question isn't too "newbish," but I've been hitting my
head over what should be a fairly simply problem for the past hour...

Header Sent...

X-JSON = {"a":1,"b":2,"c":3,"d":4,"e":5}

Javascript...

new Ajax.Request('process.php?mode=json', {
  method:'get',  onSuccess: function(transport){var json =
transport.responseText.evalJSON(true)}, /*onComplete: alert(json.a)*/
});

Firebug is reporting that json isn't defined. Am I handling JSON wrong
or what? The official documentation provided this snippet...

new Ajax.Request('/some_url', {
  method:'get',
  onSuccess: function(transport){
     var json = transport.responseText.evalJSON();
   }
});
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to