Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Looking for a banner rotator for my site

  1. #1
    Join Date
    Jul 2011
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Looking for a banner rotator for my site

    I am looking for a banner rotator that will display ads on my site. I am trying to find something that will automatically rotate itself every 5 seconds or so WITHOUT refreshing the page.

    I have already tried the rotator from this site: http://www.htmlbasix.com/banner.shtml
    But it seems to delay for me so I don't really like using it.

    So if anyone knows a good code that would be really helpful, thank you!

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Do you want it to load something new, or do you want it to preload all of the content and rotate through it?

    Do you want it to be an HTML banner, or just an image?

    Those two questions are very important:

    HTML and preload:
    Easy. You will load several divs when the page initially loads. Then set their CSS display property to "none" so they are hidden. Then use Javascript to rotate through them.

    HTML and load new content:
    Hard. You will need to use Ajax to replace the contents of the div. Google "Ajax" or look at some of the scripts available here on DD for it (under "dynamic content").

    Image and preload:
    Hard. You will need to look at an image preloading script. Then rotate through them using JS.
    Easier. Or you can do the same as HTML and hide the images (although I think display:none; may actually not load the images).

    Image and load each time:
    Easy. You will use a single <img> tag as the banner and change the SRC using Javascript in a loop every five seconds. That will make the new image load. It's like a rollover/mouseover script, but based on a loop rather than user interaction. Note that for this (and probably the others) it's best if the banner is always the same size.


    Of course even the "hard" ones will not be so difficult if you use existing scripts for the hard parts, such as Ajax.


    Decide which approach is best and if you need more help let us know.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Jul 2011
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Hi, the banners are just image files. I was just looking for something that will rotate through them all.

    Sorry if I didn't explain clearly enough--I don't know much about scripts.

  4. #4
    Join Date
    Jan 2008
    Posts
    4,167
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    I think this should do it for you: http://www.dynamicdrive.com/dynamici...flexislide.htm

    If that doesn't work out for you, I can make an even simpler banner rotator for you.
    Jeremy | jfein.net

  5. The Following User Says Thank You to Nile For This Useful Post:

    nattie (07-07-2011)

  6. #5
    Join Date
    Jul 2011
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Yes this one seems like it's exactly what I'm looking for! I'll give it a try. But does this one allow links so when I click on it, it will lead to another site?

    And just curious, what do you mean a simpler rotator?

  7. #6
    Join Date
    Jan 2008
    Posts
    4,167
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    You can use links in this.

    By simpler I meant easier to understand and look at, but if this works fine, by all means use this one.
    Jeremy | jfein.net

  8. #7
    Join Date
    Jul 2011
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Oh well I don't have much experience with this stuff so could you show me the simpler rotator? Will this cost money or anything?

  9. #8
    Join Date
    Jan 2008
    Posts
    4,167
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    No, but give the one I linked to a try first
    Jeremy | jfein.net

  10. #9
    Join Date
    Jul 2011
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    I did and it works for the most part..except it only allows 3 banners and I need more than that and it also says "undefined" under it and I'm not sure why it's doing that.

  11. #10
    Join Date
    Jan 2008
    Posts
    4,167
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    It allows more, you just have to add more to the array:
    Code:
    variableslide[0]=['ball.gif', '', '']
    variableslide[1]=['spaceship.gif', 'http://www.space.com', 'Has aliens landed on earth? You decide.']
    variableslide[2]=['cake.gif', '', '']
    variableslide[3] = ['','','']
    variableslide[4] = ['','','']
    Jeremy | jfein.net

Bookmarks

Posting Permissions

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