Author Topic: chitika script  (Read 2315 times)

0 Members and 1 Guest are viewing this topic.

Offline noobnonin

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 151
  • Rating: +3/-38
    • View Profile
chitika script
« on: October 08, 2013, 03:30:15 pm »
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

« Last Edit: October 08, 2013, 03:32:33 pm by noobnonin »

Offline noobnonin

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 151
  • Rating: +3/-38
    • View Profile
Re: chitika script
« Reply #1 on: October 10, 2013, 08:06:18 pm »
Good day

well i kinda fixed the problem, the problem was that a template from the html code interfer with the script from chitika so, i will have to redo the html code


Best Regards