Results 1 to 3 of 3

Thread: swap image help...

  1. #1
    Join Date
    Jul 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question swap image help...

    hello to you all,

    to get a clearer picute of what i am trying to do please visit...

    http://www.motivesounds.com/letairpl...rheadinfo1.htm

    i want it so when you click on the numbers below the photo of the band the image of the band changes...

    i got it working with onMouseOver
    but when i try to get it working with OnClick it works for one click then just dosent work.

    can anybody help me with this????????????

    i originally tried to just have the numbers in just normal text (not a graphic)but it would not work, if anybody can help with this it would be an even bigger bonus.

    thanks in advance
    best regards
    mark

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    This is very messy code. Rather than attempt to decipher it, I shall show you how to create your own image-swap script.
    One should preload an image like so:
    Code:
    airplanes1 = new Image();
    airplanes2.src = "airplanes2.jpg";
    ... then change the image's source like so:
    HTML Code:
    <img src="airplanes1.jpg" id="theImage"/>
    <a href="airplanes2.jpg" style="cursor:pointer;" onclick="document.getElementById('theImage').src = airplanes2.src; return false;">2</a>
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Jul 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thank you for replying but i am still confused as to where i put the new bits of code and what original bits of code i need to take out.

    i am using dreamweaver so maybe that is to blame for the messy code, or just myself, i am still learning afterall.

    if you could take the time to implement your new code on my page i would be truly grateful or if you could talk me through it on a messenger?

    thanks again
    i really appreciate it

    msn = drunkenmind@hotmail.com
    aol = fallendear
    yahoo = mark_howlette

Bookmarks

Posting Permissions

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