PDA

View Full Version : refresh an image?


RickyP
09-26-2005, 02:14 AM
http://computersense.org/

as you can see there are two image boxes that when you refresh your page the image changes...

i want to set it up so that when you click on the text below the image, it refreshes JUST THAT IMAGE.

any way i can do this?

RetroGamer1991
09-28-2005, 10:36 PM
give that image a ID such as ID="refreshthisimage"

then in javascript, change that image

document.getElementById('refreshthisimage').src= "myimage.jpg"


You can put

onclick="changemyimagefunction();"

in your A tag

:thumbup: