Christopher Jordan schrieb: > Hi folks, > > I have an ajax call that upon success has a variable 'r' that > contains a JSON encoded string. I eval that string and it becomes an > object (an array of structures, etc.), but when I try returning that > object from the function to the caller, something goes wrong. The caller > says that the value returned is undefined. > [...] > Help! :o( > > I'm really confused why this isn't working. I need serious help... asap! > :o( :o( > Wrapping the $.ajax call in a function doesn't make the call synchronous. Your function returns before the success callback is executed. You have to restructure your code to work with the success callback, instead of relying on a return value.
-- Jörn Zaefferer http://bassistance.de _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
