78
rated 0 times
[
84]
[
6]
/ answers: 1 / hits: 106175
/ 14 Years ago, tue, march 1, 2011, 12:00:00
I would like to create a JavaScript function which returns the value of a jQuery AJAX call. I would like something like this.
function checkUserIdExists(userid){
return $.ajax({
url: 'theurl',
type: 'GET',
cache: false,
data: {
userid: userid
},
success: function(data){
return data;
}
});
}
I know I can do this by setting async to false but I would rather not.
More From » ajax