www.webdeveloper.com
Results 1 to 5 of 5

Thread: script for changing images at page refresh

  1. #1
    Join Date
    Apr 2005
    Posts
    7

    script for changing images at page refresh

    hi evrybody!

    i'm looking for a script (maybe java?) that makes an image change whenever i refresh the page:

    for example, think about a page with an image "A" in a corner.
    when i refresh the page, i'd like this image to be substituded with image "B"

    when i refresh, i'd like this image b to be substituted with image A again.

    thanks for help!

  2. #2
    Join Date
    Apr 2003
    Location
    UK
    Posts
    2,203
    For that effect you may have to use a cookie

    Take a look at this example

    http://www.huntingground.freeserve.c...s/remember.htm
    The Silent One

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is one with an idea

  3. #3
    Join Date
    Nov 2004
    Location
    Little Britain
    Posts
    352
    Does it have to go A,B,A,B or can it go B,A,B,A or even B,A,B,B,A,B,A,A,B?

    I know it sounds like I'm taking the mick but I'm not!!

  4. #4
    Join Date
    Apr 2005
    Posts
    7
    A B A B A B and so on...

    but i think a script like this should have a parametre which would allow to randomize this sequence or to set one.

  5. #5
    Join Date
    Apr 2003
    Location
    UK
    Posts
    2,203
    The script shows the images in sequence if you want a random one see

    http://www.huntingground.freeserve.c...img_onload.htm

    Take a look in the Javascript menu there might be another random script you can adapt.
    Last edited by Mr J; 04-29-2005 at 02:01 PM.
    The Silent One

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is one with an idea

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles