Commenting Out Google Adsense Ads

Discussion in 'AdSense' started by websiteideas, Apr 22, 2006.

  1. #1
    You can't really put a <!-- and --> around the adsense ads as these tags conflict with the code inside the adsense code. Is there another way to comment out adsense ads?
     
    websiteideas, Apr 22, 2006 IP
  2. toomuch72

    toomuch72 Peon

    Messages:
    165
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Yeah there is a part in the google code that conflicts with regular html comments. Best way to get around it would be by using java comments.

    / ** - starts the comment(or equivalent to <!-- in html Note: remove the space after the slash)
    */ - end the comment(or equivalent to --> in html

    This also requires script tags before and after so the final thing would look like this don't forget to close the script tags on both sides or it too will effect your google code.
    <script>
    / **
    google adsense code
    */
    </script>

    Edit: in order to get some of these to show up in the message needed to put spaces in the astericks there are no spaces in the actual code
     
    toomuch72, Apr 22, 2006 IP