# "rotating" image on homepage

**URL:** <https://forum.kirupa.com/t/rotating-image-on-homepage/186767>\
**Category:** web dev\
**Created:** [April 24, 2006, 2:31pm UTC](https://forum.kirupa.com/t/rotating-image-on-homepage/186767 "2006-04-24T14:31:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alinser](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@Alinser](https://forum.kirupa.com/u/Alinser)\
**Post date:** [April 24, 2006, 2:31pm UTC](https://forum.kirupa.com/t/rotating-image-on-homepage/186767/1 "2006-04-24T14:31:46Z")

</div>

hello —

I was wondering if anyone knew the code, I believe it’s Java, to have 3 or 4 different images on the index.html everytime a user clicked. I don’t want it to actually spin - but just rotate through the images so something different comes up… [apple.com](http://apple.com) does that… Any links or code for me? Just spent some time searching but had no luck, I know i’ve seen it before.

THANK YOU!!!

Alinser

---

<div class="post-metadata">

**Author:** ![simplistik](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/simplistik/32/7747_2.png) [@simplistik](https://forum.kirupa.com/u/simplistik)\
**Post date:** [April 24, 2006, 2:51pm UTC](https://forum.kirupa.com/t/rotating-image-on-homepage/186767/2 "2006-04-24T14:51:42Z")

</div>

hmmm… i just did a quick google and this was the first result…

[http://www.javascript-page.com/ranimage.html](http://www.javascript-page.com/ranimage.html)

I assume all you want is random images to show up right?

---

<div class="post-metadata">

**Author:** ![skOOb](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@skOOb](https://forum.kirupa.com/u/skOOb)\
**Post date:** [April 24, 2006, 3:48pm UTC](https://forum.kirupa.com/t/rotating-image-on-homepage/186767/3 "2006-04-24T15:48:50Z")

</div>

That should just be some simple javascript cycling through a list of images. search for image swapping or something on google. it is pretty straight forward. My google results:

[Link 1](http://javascript.internet.com/miscellaneous/image-swap-and-preload.html)  
[Link 2](http://javascript.internet.com/miscellaneous/image-swap-and-preload.html)  
[Link 3](http://www.mcli.dist.maricopa.edu/tut/tut27d.html)

All look very promising.

---

<div class="post-metadata">

**Author:** ![JoshuaJonah](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joshuajonah/32/1775_2.png) [@JoshuaJonah](https://forum.kirupa.com/u/JoshuaJonah)\
**Post date:** [April 24, 2006, 3:50pm UTC](https://forum.kirupa.com/t/rotating-image-on-homepage/186767/4 "2006-04-24T15:50:16Z")

</div>

You can also use PHP if your looking for a more compatible approach. That’s what Nokrev uses on his sig.

---

<div class="post-metadata">

**Author:** ![simplistik](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/simplistik/32/7747_2.png) [@simplistik](https://forum.kirupa.com/u/simplistik)\
**Post date:** [April 24, 2006, 4:44pm UTC](https://forum.kirupa.com/t/rotating-image-on-homepage/186767/5 "2006-04-24T16:44:09Z")

</div>

> [@Defective](#):
>
> You can also use PHP if your looking for a more compatible approach. That’s what Nokrev uses on his sig.

Ah yea, that’s true… I’m not sure what one he uses but I know ALA has a pretty nice script that does that… [A Better Image Rotator – A List Apart](http://alistapart.com/articles/betterrotator)

---

<div class="post-metadata">

**Author:** ![Alinser](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@Alinser](https://forum.kirupa.com/u/Alinser)\
**Post date:** [April 25, 2006, 8:37pm UTC](https://forum.kirupa.com/t/rotating-image-on-homepage/186767/6 "2006-04-25T20:37:12Z")

</div>

Thanks for all of the responses – I checked into all of the links & tried to work it out on my page, but have not had success. I’m trying to get an effect like [gettyimages.com](http://gettyimages.com) where each time you go to that homepage there is a different image, but I think just 3 or 4 rotate through.

I keep running into trouble because of the way my page is set up with all of the js from rollovers & I don’t want the image in the ‘\<head\>’ but the ‘\<body\>’… This is the page I’m looking to have the image rotate on: [www.mercurygallery.com/index2.html](http://www.mercurygallery.com/index2.html).

I’m mainly an HTML via Dreamweaver person, PHP & java are a little over my head (trying to learn!!!) Any further help would be appreciated!

THANK YOU

---

<div class="post-metadata">

**Author:** ![Alinser](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@Alinser](https://forum.kirupa.com/u/Alinser)\
**Post date:** [April 25, 2006, 8:37pm UTC](https://forum.kirupa.com/t/rotating-image-on-homepage/186767/7 "2006-04-25T20:37:29Z")

</div>

Thanks for all of the responses – I checked into all of the links & tried to work it out on my page, but have not had success. I’m trying to get an effect like [gettyimages.com](http://gettyimages.com) where each time you go to that homepage there is a different image, but I think just 3 or 4 rotate through.

I keep running into trouble because of the way my page is set up with all of the js from rollovers & I don’t want the image in the ‘\<head\>’ but the ‘\<body\>’… This is the page I’m looking to have the image rotate on: [www.mercurygallery.com/index2.html](http://www.mercurygallery.com/index2.html).

I’m mainly an HTML via Dreamweaver person, PHP & java are a little over my head (trying to learn!!!) Any further help would be appreciated!

THANK YOU

---

<div class="post-metadata">

**Author:** ![Alinser](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@Alinser](https://forum.kirupa.com/u/Alinser)\
**Post date:** [April 25, 2006, 8:38pm UTC](https://forum.kirupa.com/t/rotating-image-on-homepage/186767/8 "2006-04-25T20:38:17Z")

</div>

oops - stupid mouse locked up on me - sorry about that!
