Well that is essentially what I do. In the callback function, if I alert the returned data, it's null. I'm thinking that's because while the user is asked for authorization to connect to the Internet from the app, the ajax call executes at that point in time, and by the time the user authorizes, there is no result to be returned since the ajax already executed.
So I tried setting a very long timeout (60 secs) to give the user enough time to authorize, but even still, the returned result is null.
So the success callback fires, the first alert works, the 2nd returns null, and the 3rd never fires.