Hello
I am trying to figure how to make a image display with a text description when the item is selected from a dropdown.
I have gotten the image to display when you select it from a dropdown but I cannot figure out how to make the description change when the image changes. The description shows but does not change.
If I use this I can get the description to change but the image will not.: <select name="borders" size="1" onChange="displaydesc(document.CanadaGallery.borders, thetext1, 'textcontainer1')">
<!--Example drop down menu 1-->
<form name="CanadaGallery">
<select name="borders" size="1" onChange="displaydesc(document.CanadaGallery.borders, thetext1, 'textcontainer1')">
<option value="sd" selected="selected">Color 1</option>
<option>Color 2</option>
<option>Color 3</option>
<option>Color 4</option>
<option>Color 5</option>
</select>
<table width="819" height="62" border="0" cellpadding="0" cellspacing="0">
<tr>
<td scope="col"><span id="textcontainer1" align="left" style="font:italic 13px Arial"></span> </td>
</tr>
</table>
<script type="text/javascript">
var thetext1=new Array()
thetext1[0]="Selection 1"
thetext1[1]="<strong>Linen: </strong>with Heat Sensitive Ink<br><strong>Color: </strong>Process Blue<br><strong>Available Formats: </strong>Compact</br>"
thetext1[2]="Selection 3"
thetext1[3]="Selection 4"
thetext1[4]="Selection 5"
function displaydesc(which, descriptionarray, container){
if (document.getElementById)
document.getElementById(container).innerHTML=descriptionarray[which.selectedIndex]
}
displaydesc(document.CanadaGallery.borders, thetext1, 'textcontainer1')
</script>
</form>
</p>
</body>
</html>
Can anyone help me figure this out.
Thanks for the help in advance.
Art
I am trying to figure how to make a image display with a text description when the item is selected from a dropdown.
I have gotten the image to display when you select it from a dropdown but I cannot figure out how to make the description change when the image changes. The description shows but does not change.
If I use this I can get the description to change but the image will not.: <select name="borders" size="1" onChange="displaydesc(document.CanadaGallery.borders, thetext1, 'textcontainer1')">
<!--Example drop down menu 1-->
<form name="CanadaGallery">
<select name="borders" size="1" onChange="displaydesc(document.CanadaGallery.borders, thetext1, 'textcontainer1')">
<option value="sd" selected="selected">Color 1</option>
<option>Color 2</option>
<option>Color 3</option>
<option>Color 4</option>
<option>Color 5</option>
</select>
<table width="819" height="62" border="0" cellpadding="0" cellspacing="0">
<tr>
<td scope="col"><span id="textcontainer1" align="left" style="font:italic 13px Arial"></span> </td>
</tr>
</table>
<script type="text/javascript">
var thetext1=new Array()
thetext1[0]="Selection 1"
thetext1[1]="<strong>Linen: </strong>with Heat Sensitive Ink<br><strong>Color: </strong>Process Blue<br><strong>Available Formats: </strong>Compact</br>"
thetext1[2]="Selection 3"
thetext1[3]="Selection 4"
thetext1[4]="Selection 5"
function displaydesc(which, descriptionarray, container){
if (document.getElementById)
document.getElementById(container).innerHTML=descriptionarray[which.selectedIndex]
}
displaydesc(document.CanadaGallery.borders, thetext1, 'textcontainer1')
</script>
</form>
</p>
</body>
</html>
Can anyone help me figure this out.
Thanks for the help in advance.
Art