* Problem now solved - Ignore thread!
Hi
I have a drop down box. When someone selects an item from the box the an image displays below. Example here.
My problem is....I don't want the value of the item to be the image location. I want to be able to make the values what I want them to be.
This is the code im using.....
PHP Code:
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><form name="mygallery"><p><select
name="picture" size="1" onChange="showimage()">
<option selected value="mobiles/images/handsets/6230i.jpg">Nokia 6230i</option>
<option value="mobiles/images/handsets/6030.jpg">Nokia 6030</option>
<option value="mobiles/images/handsets/6101.jpg">Nokia 6101</option>
</select></p>
</form>
</td>
</tr>
<tr>
<td width="100%"><p align="center"><img src="mobiles/images/handsets/6230i.jpg" name="pictures" width="99"
height="100"></td>
</tr>
</table>
And in the head I have this Javascript...
PHP Code:
<script language="javascript">
<!--
function showimage()
{
if (!document.images)
return
document.images.pictures.src=
document.mygallery.picture.options[document.mygallery.picture.selectedIndex].value
}
//-->
</script>
Can anyone please please help
Thanks for reading 
Last edited by noswad; 07-14-2006 at 11:46 AM..
|