Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do i get 5 images to swap randomly, using cookies?

Status
Not open for further replies.

debrac

IS-IT--Management
Jan 9, 2001
48
AU
how do i get 5 images to swap randomly, using cookies and with 5 different rollover images?
 
so i can keep track of which image was used, and rather than chosing random images to swap, I use the next numbered image.
 
sorry!!! i guess my wording wasnt too exact.
i want to use cookies so it doesnt have to be random images, but rather have some ascending order.
 
1. Put your 5 images into an array.
2. Start with the first image and displayit, also write it's name tothe cookie.
3. Next time in read the cookie. Increment the cokies images counter by 1 and display the new image.
Next write THAT name to the cookie so it'll be available the next time around
4. Bask in your glory

Hope this helps
--Gary The door to life is never locked, but few have the knowledge to open it.
 
Gary, What if I want to do the same w/o cookies?
 
You can use server variables but how do you know if that same person has came back? I assume you want to display the images in order for each person. Correct?

-Gary

oopse: 5PM I'm outta here till tomorrow The door to life is never locked, but few have the knowledge to open it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top