Created
April 6, 2011 07:17
-
-
Save notbrain/905265 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getAjaxResultAndReturnIt() { | |
$.getJSON("/url", function(json){ | |
if(json.result) { | |
return true; // will not bubble up as return of function call | |
} else { | |
return false; // will not bubble up as return of function call | |
} | |
}); | |
} | |
function getContent() { | |
var content = getAjaxResultAndReturnIt(); | |
// content = undefined | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment