Banner ad rotator script.

Discussion in 'JavaScript' started by Laszlo, Dec 25, 2007.

  1. #1
    Hi I found a cool banner ad rotator script on a website and I created a few banner images. I pasted them on some of my pages such as on my home page.
    It is working fine however; when I paste two of the same scripts on one page unfortunately only one of them is working.
    Can you guys tell me what is it that I have to fix in order to be able to past two on the same page?

    I will appreciate your thoughts. Thanks Laszlo.:p
     
    Laszlo, Dec 25, 2007 IP
  2. ajsa52

    ajsa52 Well-Known Member

    Messages:
    3,426
    Likes Received:
    125
    Best Answers:
    0
    Trophy Points:
    160
    #2
    Probably the script is using DOM function like getElementbyId() to locate the element to modify.
    So two instances of same script will locate the same element (that with the ID used).
     
    ajsa52, Dec 26, 2007 IP
  3. Laszlo

    Laszlo Peon

    Messages:
    90
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Laszlo, Dec 26, 2007 IP