lucia
23-01-2006, 16:53/04:53PM
Could someone tell me what I'm doing wrong with this code? I need it to display and swap my images based on what someone selects from a drop down menu box.
<script language="javacript"><!--
function change (what) {
value = what.options[what.selectedIndex}.value;
if (value !='')
if (document.images)
document.images['myImage'].src = value; }
//--></script>
<IMG src="th-banner-A601.gif" name="myImage"></p>
<form method="post" action="http://order.store.yahoo.com/cgi-bin/wg-order?yhst-81691122084052+banniversary6">
<p><font size="2">Happy Anniversary (name)<br>
<font face="courier">
<input name="vw-inscription-486170707920416E6E697665727361727920286E616D65292" maxlength="30" size="30" /></font><br>
<font size="1">Or enter any additional information<br>
needed in the box above</font></font>
<br>
<br>
<select onChange="change(this)">
<option>Select Style
<option value="th-banner-A601.gif">A601
<option value="banner-A602.gif">A602
</select>
<br><br>
<input type="submit" value="Add to Cart">
</p></p>
</form>
Thank you so much! :(
<script language="javacript"><!--
function change (what) {
value = what.options[what.selectedIndex}.value;
if (value !='')
if (document.images)
document.images['myImage'].src = value; }
//--></script>
<IMG src="th-banner-A601.gif" name="myImage"></p>
<form method="post" action="http://order.store.yahoo.com/cgi-bin/wg-order?yhst-81691122084052+banniversary6">
<p><font size="2">Happy Anniversary (name)<br>
<font face="courier">
<input name="vw-inscription-486170707920416E6E697665727361727920286E616D65292" maxlength="30" size="30" /></font><br>
<font size="1">Or enter any additional information<br>
needed in the box above</font></font>
<br>
<br>
<select onChange="change(this)">
<option>Select Style
<option value="th-banner-A601.gif">A601
<option value="banner-A602.gif">A602
</select>
<br><br>
<input type="submit" value="Add to Cart">
</p></p>
</form>
Thank you so much! :(