Javascript to hide code in a page

Discussion in 'JavaScript' started by Jboo, Jun 11, 2007.

  1. #1
    Hi,

    I know nothing about javascript or databases but I'll try and explain what I'm trying to do as best I can and hopefully someone can help.

    I have a site that runs using an article directory script. As it runs using templates all of the pages look the same with adsense running in them. However, I would like to remove adsense from pages under certain categories.

    When I go into PHPMyAdmin to view the database the 'field' that has the category is called "category_id".

    I can't include PHP in the templates themselves so is there anyway that I could remove adsense using javascript for certain categories. I'm guessing it would need some sort of script where "articles under category X" will not display the adsense ads.

    Any help or suggestions would be great.

    Thanks in advance.
     
    Jboo, Jun 11, 2007 IP
  2. joesgraphics

    joesgraphics Peon

    Messages:
    206
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You could use javascript if you have a div with an id or a class around the adverts if you have a link to the site i can make the code for you.
     
    joesgraphics, Jun 11, 2007 IP
  3. rochow

    rochow Notable Member

    Messages:
    3,991
    Likes Received:
    245
    Best Answers:
    0
    Trophy Points:
    240
    #3
    If you can't use php includes, go with JoesGraphics idea
     
    rochow, Jun 11, 2007 IP
  4. Jboo

    Jboo Active Member

    Messages:
    229
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    #4
    That would be great, I'll PM you. Thanks a lot.
     
    Jboo, Jun 11, 2007 IP