Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Google Adsense Rotate

    I want to be able to rotate Adsense ads. 3/4 of the time, it will be someone else's. 1/4 of the time, it will be mine (my code is displayed already). However, the code I tried doesn't work. Can someone tell me how to fix this -

    Code:
    <script language="JavaScript">
    
    images = new Array(4);
    
    //the following string is really all on one line
    
    images[0] = '<script type="text/javascript">google_ad_client = "ca-pub-4811954214954647";google_ad_slot = "2713945203";google_ad_width = 728;google_ad_height = 90;</script><script type="text/javascript"src="http:
    //pagead2.googlesyndication.com/pagead/show_ads.js"
    ></script>';
    
     
    
    images[1] = 'other code';
    
     
    
    images[2] = 'other code';
    
     
    
    images[3] = 'other code';
    
     
    
    index = Math.floor(Math.random() * images.length);
    
    document.write(images[index]);
    
    //done
    
    </script>
    Last edited by JTyler's Articl; 12-20-2011 at 09:55 PM.

  • #2
    New to the CF scene
    Join Date
    Dec 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What do you mean?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •