»
EnglishFrenchVietnamese

Print - Drop Down Image Selector I - JavaScriptBank.com

Full version: jsB@nk » Image » Image viewer » Drop Down Image Selector I
URL: http://www.javascriptbank.com/drop-down-image-selector-i.html

Drop Down Image Selector I © JavaScriptBank.comA dropdown combo box that allows surfers to choose among many images to be shown. Surfers choose an image from the combo box, and it is displayed in the predetermined space below. Notice that in this JavaScript, the images themselves are not clickable. If you want the version that not only shows different images, but makes the images clickable as well, look at version II below.

Full version: jsB@nk » Image » Image viewer » Drop Down Image Selector I
URL: http://www.javascriptbank.com/drop-down-image-selector-i.html



JavaScript
<script language="javascript"><!--function showimage(){if (!document.images)returndocument.images.pictures.src=document.mygallery.picture.options[document.mygallery.picture.selectedIndex].value}//--></script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<form name="mygallery"><selectname="picture" size="1" onChange="showimage()"><option selected value="logojs.gif">Picture of JavaScriptBank.com</option><option value="photo3.jpg">Photo 3</option><option value="photo4.jpg">Photo 4</option></select></form><img src="logojs.gif" name="pictures"><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->