#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2003
    Posts
    4
    Rep Power
    0

    Question cookie/javascript image changer??


    I've been trying for a while to find a javascript that will:

    (1) use cookies to find out if a user has been to the page or how many times.

    and

    (2)based on this, show a different picture every time the page is refreshed or reopened.

    Basically I would like to find a script that will show a different picture every time someone opens or refreshes the page. But I don't want to use a 'random' script because I want to make sure that it's different by going through a sequencial array or something, until the user has opened the page more times than there is images in the array. In which case, it will loop and go back to pic[0] in the array.
    I also don't have a clue about how to use php scripts (where to place them in a page, what else is needed to make them run, etc, etc.), so I haven't tried using them.
    I thought that Javascript with the use of cookies would be the best/easiest way, but it's proving harder than I thought.

    can anyone help me with this???
  2. #2
  3. No Profile Picture
    Senior Citizen
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2001
    Location
    leftcoast
    Posts
    2,019
    Rep Power
    16

IMN logo majestic logo threadwatch logo seochat tools logo