...

View Full Version : Combo Boxes and Images



gazzer
10-29-2002, 08:27 AM
I have a combo box which has a number of items within it, what I would like to know is wether it is possible to asign an different image to each selection.

Not within the combo box, but by the side, so that when a user chooses a particular item, the image changes also.

Gazzer

Mhtml
10-29-2002, 09:24 AM
<select onChange="PreviewImage.src='this.value'">
<option value="images/img1.gif">Preview Gif 1</option>
<option value="images/img2.gif">Preview Gif 2</option>
<option value="images/img3.gif">Preview Gif 3</option>
</select>
<img name=PreviewImage" src="images/firstimg.gif">

gazzer
10-29-2002, 09:26 AM
Thanks for that little gem of code, I can at least have a better chance now.

Cheers.

gazzer



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum