Results 1 to 3 of 3

Thread: Image Change

  1. #1

    Thread Starter
    Hyperactive Member MikeBAM's Avatar
    Join Date
    Sep 2000
    Location
    Metro Detroit
    Posts
    284

    Image Change

    I would like to have to image on a page and a link of text that dosn't go any where, but just simply changes the picture to another picture. Can this be done? If so how?
    ~* )v( ! /< E *~

  2. #2
    Fanatic Member Psyrus's Avatar
    Join Date
    Jul 2000
    Location
    NJ
    Posts
    602
    Try something like this:

    <html>
    <head>
    <title></title>
    <script>

    var pic1 = new Image(180,216);
    var pic2 = new Image(180,216);

    pic1.src = 'yourpic.jpg';
    pic2.src = 'yourpic_next.jpg';

    function changePic(obj){

    obj.src = pic2.src;

    }
    </script>
    </head>
    <body>
    <br>
    <center>
    <img SRC = "yourpic.jpg" NAME = "imgHolder">
    <br>
    <a HREF = "javascript:changePic(imgHolder);">Next Image</a>
    </center>
    </body>
    </html>
    Chris

    VB 6.0 Calendar App Video Gamers Group
    Don't forget to rate people if they helped you.

  3. #3

    Thread Starter
    Hyperactive Member MikeBAM's Avatar
    Join Date
    Sep 2000
    Location
    Metro Detroit
    Posts
    284
    Thank You So Much! That's Just What I Needed!
    ~* )v( ! /< E *~

Posting Permissions

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



Click Here to Expand Forum to Full Width