Log in

View Full Version : swap image help...



motivesounds
07-03-2005, 04:49 PM
hello to you all,

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

http://www.motivesounds.com/letairplanescircleoverheadinfo1.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

Twey
07-03-2005, 05:49 PM
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:
airplanes1 = new Image();
airplanes2.src = "airplanes2.jpg";... then change the image's source like so:
<img src="airplanes1.jpg" id="theImage"/>
<a href="airplanes2.jpg" style="cursor:pointer;" onclick="document.getElementById('theImage').src = airplanes2.src; return false;">2</a>

motivesounds
07-03-2005, 06:03 PM
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