Results 1 to 2 of 2

Thread: Random banner display

  1. #1
    Join Date
    Apr 2006
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Random banner display

    Hi -

    I'm looking for a script that allows me to randomly display a dozen ad banners that are in .jpg, .gif and .swf (flash) formats.

    Any help would be greatly appreciated!

    Thanks

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

    Default

    I'd do this serverside rather than clientside. (php, not JS).
    there's nothing wrong with JS, except that it's not compatible, and, for me at least, the php would be easier.

    Also, JS is memory intensive for the user... seems like it's not worth doing it to me (through JS, that is), but totally your choice.

    Basically... create an array or something like that, then a random number, from 1-12, then use the array component matching the random number you get, and display that. You're done.

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
  •