rendered paste body<html>
<head>
<script>
images = new Array();
images["img1"] = "http://www.linux.org.ru/black/newhead12.gif";
images["img2"] = "http://www.linux.org.ru/black/newhead35.gif";
function preview() {
lst = document.getElementById("list");
image = document.getElementById("prev");
id = lst.options[lst.selectedIndex].id;
if (id != "") {
prev.src = images[id];
}
}
</script>
</head>
<body>
<select id="list" onchange="preview()">
<option id="">--</option>
<option id="img1">Image 1</option>
<option id="img2">Image 2</option>
</select>
<br/>
Preview:<br/>
<img id="prev" src="" />
</body>
</html>