Im trying to build a counter for my links in many website I have. so every click on my links on other websites, my database will count them..
(every website is in another server..)
I tried to build some script in Jquery on every page that I want to make this happened:
$(document).ready(function() {
attach();
});
function attach() {
var name;
var classCounter = $('.counterStrike');
classCounter.bind('click', function() {
var name = $(this).attr('name');
var url = "http://XXXXX.######.XX/XXX/XXXX/Handler/Handler.aspx";
var op = "1";
var fromLocation;
$.post(url, {
name: name,
op: op
}, function(result) {
alert(1);
$("#result").html(result);
});
});
}
this worked fine in the same server, so I guess I have some cross browser problem ? right? is there a way to manipulate it ?
Thanks!