Code
<!-- TWO STEPS TO INSTALL IMAGE PREVIEWER:
1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Ronnie T. Moore, Editor -->
<!-- Idea and images by: Stuart King (stuart@ciceron.com) -->
<! >
<! >
<!-- Begin
function previewPic(sel) {
document.previewpic.src = "" + sel.options[sel.selectedIndex].value;
}
function showPic(sel) {
images = new Array();
images[1] = "axe.jpg";
images[2] = "castle.jpg";
images[3] = "iceberg.jpg";
images[4] = "ocean.jpg";
images[5] = "olympus.jpg";
images[6] = "temple.jpg";
window.location.href = images[sel.selectedIndex+1];
}
// End -->
</script>
</HEAD>
<!-- STEP TWO: Copy this code into the BODY of your HTML document -->
<BODY>
<center>
<form name=picform>
<select name=selbox size=1 onChange="previewPic(this)">
<option value="axe-small.jpg">Axe
<option value="castle-small.jpg">Castle
<option value="iceberg-small.jpg">Iceberg
<option value="ocean-small.jpg">Ocean
<option value="olympus-small.jpg">Olympus
<option value="temple-small.jpg">Temple
</select>
<p>
<img name="previewpic" src="axe-small.jpg" width=150 height=113 border=1>
<p>
<input type=button value="Show Image" onclick="showPic(this.form.selbox)">
</form>
</center>
<!-- Script Size: 1.59 KB -->