Function to return result of ajax call


This question already has an answer here:


The first 'A' in AJAX means "asynchronous", which means that the result comes back after the call to $.ajax() returns. All processing of the result must be done in ajax_find_user_result.

Note that this isn't a limitation. It's actually a good thing, since it means your browser won't hang waiting for the result to come back. (There are other ways to solve this problem, but callbacks is the way it's done in JavaScript, and AJAX in particular.) If you really, really want to do synchronous calls, set async=false in the parameters, but you really, really shouldn't do this (plus, it isn't supported in some cases).

Need Your Help

Shared data cloud storage for Android

android api sdk cloud

I'm developing android application that needs to store and read data from some shared storage in the cloud.

Android 2.2: Problem playing video from SD card

android videoview lag

When I try to play a video on my sd card, i get the error message "Sorry, this video cannot be played". Is there anything wrong with my code? None of the commented code seems to work.