Thanks for the heads up, here's what I have now...

function JSON_REQUEST()
{
new Ajax.Request('process.php?mode=json', { method:'get',  onSuccess:
function(transport){myvar = transport.headerJSON, alert(myvar);}
});
}

JSON_REQUEST();
alert(myvar);

Still get an alert with the object, then a warning that myvar is
undefined.

Can somebody provide an example of how I would get that json object
out of the onSuccess and into the scope of my program, either as a
global variable or something that's returned?
--~--~---------~--~----~------------~-------~--~----~
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