KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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.
Tags (comma-separated)
Save Edits
Cancel