...

View Full Version : need a Drop Down image display menu



Baja Resident
08-30-2007, 03:39 AM
I am trying to find code for a page to display images using input selected in a drop down on the same page. I will try to create an example here:


{image a displayed}

[dropdown selecting image a]


---------------------------------------------------------

{image b displayed}

[dropdown selecting image b]



----------------------------------------------------------

and so on...


I plan to have multiple images on the screen in sort of a mosaic depending on what is selected in the drop down. Can someone help with this?

Baja Resident
08-30-2007, 04:58 AM
ok this article: http://wsabstract.com/script/cut173.shtml is EXACTLY what I need... HOWEVER.... it doesn't work for multiple applications on the same page. Is there some way to make this code work many times on the same page???

please help!

mcjwb
08-30-2007, 01:31 PM
Does this help?


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
<script type="text/javascript">
<!--
function showimage(selectList, target)
{
if (document.images){
return document.images[target].src=selectList.options[selectList.selectedIndex].value
}
}
//-->
</script>
</head>
<body>
<form name="mygallery">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<select name="picture" size="1" onChange="showimage(this, 'pictures')">
<option selected value="me.gif">Picture of me</option>
<option value="myaunt.gif">Picture of my aunt</option>
<option value="brother.gif">Picture of my brother</option>
</select>
</td>
<td>
<select name="picture1" size="1" onChange="showimage(this, 'pictures1')">
<option selected value="me.gif">Picture of me</option>
<option value="myaunt.gif">Picture of my aunt</option>
<option value="brother.gif">Picture of my brother</option>
</select>
</td>
</tr>
<tr>
<td>
<img src="me.gif" name="pictures" width="99" height="100">
</td>
<td>
<img src="me.gif" name="pictures1" width="99" height="100">
</td>
</tr>
</table>
</form>
</body>
</html>

let me know if you need an explanation.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum