Pass a parameter to the callback, and check for the dataType on Ajax
afterClose : function() {
$.ajax({
type: "GET/POST",
url: "myURL",
dataType: 'json',
success: function(data){
// Handler for data Result
}
});
}
That should do the trick.