Hi! I wrote a script that makes some checks and than counts the clicks via a php script. However the way it should, it only works (counting the clicks) in IE not in Firefox:
$('a').click(function() { if ( this.id != '' ) { var tp = this.id.charAt(0); if(tp != 'l' && tp != 'c') { return true; } if(this.id.length < 2) { return true; } var itemid = this.id.substring(1); if(parseInt(itemid.charAt(0)) < 1 || itemid.match(/\D/)) { return true; } var h = Math.random(); $.get("/click-count.php", { id:itemid, type:tp, h:h }); return true; } }); If I change the last "return true" to alert("something"); it works in every browser including firefox. However I don't want to have the alert box of course :) Please, if anybody could tell me what is wrong with that script and how to fix it, i would be very greatfull. Greetings from Austria, lapinkulta