Hi I was wondering if someone had a minute to show me how I might be able to match up changing hyperlinks to the below drop-down images selection script.
Thanks so much.
[CODE]
<html>
<head>
<script>
var Path=’images/’;
function CngColor(obj){
index=obj.selectedIndex;
if (index<1){document.getElementById(‘Img1’).src=”images/Blank.gif”; return; }
document.getElementById(‘Img1’).src=Path+obj.options[index].id;
}
</script>
</head>
<body>
<select onchange=”CngColor(this);” >
<option >Select</option>
<option id=”image1.jpg” value=”Image 1″ >Image 1</option>
<option id=”image2.jpg” value=”Image 2″ >Image 2</option>
<option id=”image3.jpg” value=”Image 3″ >Image 3</option>
</select>
<a href=”#”>
<img id=”Img1″ src=”images/Blank.gif” width=100 height=100 >
</a>
<script type=”text/javascript”>
window.onload=
function() {
var sels = document.getElementsByTagName(‘select’);
CngColor(sels[0]);
CngColor2(sels[1]);
CngColor3(sels[2]);
};
</script>
</body>
</html>