I know enough JS just to screw things up, apparent by this post. ?
I am trying to create an order form for cutom purses, totes, etc. I have drop down boxes with the name of fabrics, ribbons, etc. and when a custom selects a name, I want an image to the left of the dropdown to change to the correct swatch.
Here is what I have so far — where did I go wrong?
[QUOTE]
<script language=”JavaScript” type=”text/JavaScript”>
<!–
function UpdateColor() {
colors = new Array(2);
colors[16]=”cordgrey_t.jpg”;
colors[17]=”cordolive_t.jpg”;
index = document.add.OPTidOption7.selectedIndex;
document.add.color.src=”images/”+colors[index];
}
//–>
</script>
and for the images/dropdown I have
[QUOTE]
<img src=”images/cordgrey_t.jpg” border=”1″ id=”color”>
<select name=”OPTidOption7″ class=”CPoptSel” onChange=”javascript:UpdateColor()”>
<option value=”16″>Corduroy : Grey</option>
<option value=”17″>Corduroy : Olive</option>
</select>
Any help is SO appreciated!!!!!