Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Looping Images  (Read 3063 times)

0 Members and 1 Guest are viewing this topic.

Matt123

  • Guest
Looping Images
« on: September 21, 2007, 03:55:22 PM »
Be gentle, I think this is where it goes, if it isn't please direct me elsewhere or drop me a message or whatever.

What I'm looking to do is have something on my website which loops. Obviously space is precious in web design, so I'm using similar sized images advertising different features of the website (obviously they are linked images which when clicked will send you somewhere).

I know the html for links and for images but how do I make them loop? So I have one and if you refresh you get another one?

Thanks

Matt

michaewlewis



    Intermediate
  • Thanked: 26
    • Yes
    • Yes
  • Experience: Expert
  • OS: Unknown
Re: Looping Images
« Reply #1 on: September 22, 2007, 02:20:29 PM »
So do you want a random image to display each time the page is refreshed? or do you want something more along the lines of an animation?

Dilbert

  • Moderator


  • Egghead

  • Welcome to ComputerHope!
  • Thanked: 44
    Re: Looping Images
    « Reply #2 on: September 22, 2007, 11:35:17 PM »
    You could use JavaScript for this task. I'm not familiar with JS anymore (it's been several years), but I do know programming.

    What I would do is have Javascript create a random number between 0 and... (however many images you have - 1). Tell it to place an image there based on the RND selection.

    Now we just wait for someone proficient in JavaScript to take what I just said and turn it into code. :)
    "The geek shall inherit the Earth."