Here is my shortened code snippet:
$(document).ready(function() {
$.get("/Handlers/SearchData.ashx",
function(data) {
json = $.evalJSON(data);
});
//do some other stuff
//use json data
alert(json == null);
});
Alert says true because evalJson is not done processing JSON data yet (21kb gzipped). I need to wait somehow for it to finish before using that data - exactly what I'd do with DoEvents in a while loop.