What exactly doesn't work on FF? From what I see, you're not using the value returned from the GET anywhere. When you click a link, it sends the GET immediately and then returns true, which causes the link to be followed. My guess is that IE finishes the Ajax request before going on to the href, while FF just aborts the request and goes straight to it. If that's the case, you could delay the click until the GET has been processed:
$('a').click(function(){ var tp = this.id.charAt(0), itemid = this.id.substr(1), link = $(this).attr('href'); if ( tp && tp != 'l' && tp != 'c' && this.id.length >= 2 && itemid.chartAt(0) >= 1 && !itemid.match(/\D/) ) { var h = Math.random(); $.get("/click-count.php", { id:itemid, type:tp, h:h }, function() { window.location = link; }); return false; } }); in this case 'return true' is unneeded as it does nothing, when the ID doesnt fit the criteria. If it does, then we return false to cancel the click and change the location to the link only after the AJAX call is returned. Be aware that in case the GET fails all anchors on the page will stop working, that can be avoided by using $.ajax instead and setting the error callback to follow the href also. cheers, - ricardo On Dec 27, 1:55 pm, lapinkulta <goo...@isc.at> wrote: > Now i get your point. However, it must be also a jquery issue > as the script and click-count.php works fine in IE. > > I also think there are no overlapping requests, as the script > is fired only once when a "a" is clicked. > > Still wondering what could be wrong...