function checkUserRole(userName){ var url2 = _spPageContextInfo.webServerRelativeUrl + "/_vti_bin/ListData.svc/MyList?select=*&$filter=Email eq '"+userName+"'"; $.getJSON(url2,function(data2){ success: alert("success"); failure: alert("failure"); }); } I'm calling this function from the success event of another function (the one that gets the value for userName). When this function executes, BOTH the success and failure fire. I've tried multiple re-writes of the syntax and it always happens, but I'm at a loss for why it would happen. Any suggestions?