Page 1 of 1

How to get javascript to change an image source depending...

Posted: Tue Apr 05, 2005 6:43 pm
by compuXP
Hi,

How can I get javascript to change an image's source when the user clicks on a different list item for a <select> thing on my form?

So, if the item's VALUE is "4" then it displays "sample4.png" on that image...

How can I do this? Thanks,

-compuXP

Posted: Tue Apr 05, 2005 6:46 pm
by feyd

Code: Select all

<select onchange=&quote;your_function(this)&quote;>
we've talked about this, not necessarily specifically, but we've talked about it.

http://devguru.com/Technologies/ecmascr ... image.html for information on what properties you can play with in an image object.

Posted: Tue Apr 05, 2005 6:54 pm
by compuXP
Ah thank you :) I got it now ;)