views:

158

answers:

0

Hey,

I'm trying to use the ajaxStart and ajaxStop events with getJson calls to my webserver. The ajaxStart event is triggered on the first request, but not on subsequent requests. The encID ensures that each requested url is somewhat unique. It doesn't work on Firefox 3.5 or IE 7. In firebug, I can see the the getJSON requests are firing and completing. Any ideas?

Here are my ajax event bindings.

$('#ajaxLoader').ajaxStart(function(){    
   $(this).show();
}).ajaxStop(function(){
   $(this).hide();
});

Here is my getJSON call.

$.getJSON(location.protocol + '//' + location.host + '/enc-comment/get?format=json&c=?' + '&encId=' + encId,
function(data){
   // change text of a div
});

If I switch the getJSON call with a .ajax GET or POST, everything works fine.