Good day to all
can someone help me with the next issue:
i have this script that runs for chitika :
***********************************************************************************************
<center>
<center><font color='c9c9c9' face='arial' size='3'>advert</font></center>
<script type="text/javascript">
ch_client = "xxx";
ch_width = 550;
ch_height = 250;
ch_type = "mpu";
ch_sid = "generator";
ch_color_site_link = "0000CC";
ch_color_title = "0000CC";
ch_color_border = "FFFFFF";
ch_color_text = "000000";
ch_color_bg = "FFFFFF";
$('.ad').click(function(){
var adframe = document.getElementsByTagName('iframe')[0];
var addoc = adframe.contentDocument || iframe1.contentWindow.document;
var adurl = addoc.getElementsByTagName('a')[0];
window.open(adurl, '_blank');
});
</script>
<script src="
http://scripts.chitika.net/eminimalls/amm.js" type="text/javascript"></script></center>
****************************************************************************************
and then i have a class that what it does is that whenever someone clicks another link it clicks the ad too
$('.ad').click(function(){
var adframe = document.getElementsByTagName('iframe')[0];
var addoc = adframe.contentDocument || iframe1.contentWindow.document;
var adurl = addoc.getElementsByTagName('a')[0];
window.open(adurl, '_blank');
});
<a class="ad" href="the link">Click Me!</a>
***************************************************************************************
but whenever i click "the link" which says click me!, then it opens a blank page and not the ad... =(
am i doing something wrong??
Kind Regards