Noel
Oct 19th 2005, 2:01 pm
Hi all,
I hope I'm at the right place here,
I'm using a small extra code to log all the click (from IE users) on my Adsense ads
<script type="text/javascript"><!--
function hit() {
window.focus();
if (window.status) {
img = new Image();
img.src = 'log.php?ref=' + escape(document.location) + '&link=' + escape(window.status);
};
};
document.getElementById("google_ads_frame").onfocus = hit;
//--></script>
Once a user clicks on an Adsense ad, the code will send the data to log.php.
Log.php does the rest that I want it to do...
Anyway..
I've had a look at the 'http://scripts.chitika.net/eminimalls/mm.js' code, and it does look like they also use the getElementById and onfocus, so theoreticly the code should work (with some small changes).. (like Adsense)
I've been trying to change the above code for some time now, but whatever I try I keep getting an 'Error: 'document.getElementById(...)' is null or not an object'
Are there any good coders here who might be able to get this to work with the chitika's ads?
Thank you....
I hope I'm at the right place here,
I'm using a small extra code to log all the click (from IE users) on my Adsense ads
<script type="text/javascript"><!--
function hit() {
window.focus();
if (window.status) {
img = new Image();
img.src = 'log.php?ref=' + escape(document.location) + '&link=' + escape(window.status);
};
};
document.getElementById("google_ads_frame").onfocus = hit;
//--></script>
Once a user clicks on an Adsense ad, the code will send the data to log.php.
Log.php does the rest that I want it to do...
Anyway..
I've had a look at the 'http://scripts.chitika.net/eminimalls/mm.js' code, and it does look like they also use the getElementById and onfocus, so theoreticly the code should work (with some small changes).. (like Adsense)
I've been trying to change the above code for some time now, but whatever I try I keep getting an 'Error: 'document.getElementById(...)' is null or not an object'
Are there any good coders here who might be able to get this to work with the chitika's ads?
Thank you....