use javascript for resolution, to insert adsense code

Discussion in 'Guidelines / Compliance' started by Daey, Feb 12, 2007.

  1. #1
    hi :D

    can i use javascript to insert adsense code.
    like this:

    <script type="text/javascript" language="JavaScript">
    <!-- // Inserts ADSENSE based on screen width
    if (screen.width > 1024){
    document.write("[COLOR="DarkRed"]ADSENSE CODE 728 x 90[/COLOR]");
    
    }
    else {
    document.write("[COLOR="darkred"]ADSENSE CODE 468 x 60[/COLOR]");
    }
    // -->
    </script>
    Code (markup):

    I think that it will be fine, but whats your opinion?

    many tks :)
     
    Daey, Feb 12, 2007 IP
  2. sjk.root

    sjk.root Peon

    Messages:
    99
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    you should check with google to be sure.
     
    sjk.root, Feb 12, 2007 IP