unemployment — 2011-06-01T15:10:05-04:00 — #1
How can I make my alert work? Right now it is undefined and I need to make my function in the variable global. Can this be done?
if (json_goals === undefined)
ajax.get('/assets/ajax/user_goals.php', function (resp)
var json_goals = resp;
paul_wilkins — 2011-06-01T18:47:34-04:00 — #2
The callback function runs later on from a global scope, so the return won't do anything useful.
Try replacing the return with the alert instead.