Change onclick after page has been displayed.

B

Ben

Is it possible to change the onclick variable after a picture after it
has been displayed? e.g similar to image1.src="image.jpg".

Basically I have a button that changes 4 images to different ones and
when the different ones are clicked a different larger image will be
changed to that using a function called by the onclick command.

Thanks.

Ben.
 
K

kaeli

bs2k1 said:
Is it possible to change the onclick variable after a picture after it
has been displayed? e.g similar to image1.src="image.jpg".

Basically I have a button that changes 4 images to different ones and
when the different ones are clicked a different larger image will be
changed to that using a function called by the onclick command.

Sure it is. A few different ways, actually.
img.onclick
I think is what you were looking for.

--
--
~kaeli~
Experience is something you don't get until just after you
need it.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top