Anyone know how to do a banner rotator javacripst?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Queefcake
    Registered User
    • Feb 2006
    • 48

    #1

    Anyone know how to do a banner rotator javacripst?

    Like say my banners are:
    banner1.gif
    banner2.gif
    banner3.gif
    and everytime the page reloads it has a new banner.
    Anyone know the code to do that?
  • marko13
    Confirmed User
    • Apr 2004
    • 7512

    #2
    go www.hotscript.com and you'll find what you need....
    We are responsible for your hosting ... Enjoy in your life.
    Shared hosting from $3.95 Europe Linux VPS plans from $11.37
    http://www.LVPSHosting.com

    Comment

    • psili
      Confirmed User
      • Apr 2003
      • 5526

      #3
      I'm just doing this off-the-cuff without testing, so..... *shrug*

      Code:
      <script type="text/JavaScript">
      function rotateBanner()
      {
         var target = document.images["targetbanner"];
         var banners = array("banner1.gif","banner2.gif","banner3.gif");
         target.src = Math.floor ( Math.random ( ) * banners.length );
      }
      </script>
      <html>
       <body onload="rotateBanner()">
        <img src="clearpix.gif" name="targetBanner"/>
      </body>
      </html>
      Your post count means nothing.

      Comment

      • Queefcake
        Registered User
        • Feb 2006
        • 48

        #4
        Originally posted by marko13
        go hotscript dot com and you'll find what you need....
        That place is confusing. Ive never been able to get a script from there that worked.

        Comment

        • OG LennyT
          Wall Street Pimp
          • Jun 2003
          • 14345

          #5
          Google 'rotating banner script'

          you'll get what you need
          Tradeking - my online broker | 4.95 a trade | make real $$

          Comment

          • bobby666
            boots are my religion
            • Nov 2005
            • 21765

            #6
            if you don't waant to google go here:
            http://www.javascript-page.com
            it's free and a great script

            Comment

            • garce
              Confirmed User
              • Oct 2001
              • 7103

              #7
              Originally posted by bobby666
              if you don't waant to google go here:
              http://www.javascript-page.com
              it's free and a great script
              Cool site.

              Comment

              Working...