...

View Full Version : Problem with "Cut & Paste Drop Down Image Selector I"



dcb1101
04-29-2008, 04:09 AM
I am using the "Cut & Paste Drop Down Image Selector I" on my site in a asp.net 2.0 page and it works great. I am having a problem trying to have multiple instances of it running on one page. I need to have a total of 5 separate drop down boxes which load 5 different graphics.
I also need to be able to store the selections made and pass them on to another page.
Thank you
Below is what I have so far (first 2 selections). It looks correct but the second dosn't work right



<%@ Page Language="VB" AutoEventWireup="false" CodeFile="temp.aspx.vb" Inherits="products_custom_temp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Untitled Page</title>
<script type="text/javascript">
<!--

/*Combo Box Image Selector:
By JavaScript Kit (www.javascriptkit.com)
Over 200+ free JavaScript here!
*/

function showimage()
{
if (!document.images)
return
document.images.pictures.src=
document.form1.picture.options[document.form1.picture.selectedIndex].value
}
//-->
</script>
<script type="text/javascript">
<!--

/*Combo Box Image Selector:
By JavaScript Kit (www.javascriptkit.com)
Over 200+ free JavaScript here!
*/

function showimage2()
{
if (!document.images)
return
document.images.pictures2.src=
document.form1.picture.options[document.form1.picture.selectedIndex].value
}
//-->
</script>

<style type="text/css">
.style1
{
width: 100%;
}
.style3
{
font-size: xx-large;
font-family: "Comic Sans MS";
font-weight: bold;
text-align: center;
}
</style>
</head>
<body>

<form id="form1" runat="server">
<table class="style1">
<tr>
<td class="style3">
Select Shaft</td>
</tr>
<tr>
<td style="text-align: center">
<img src="http://www.ashearchery.com/images/custom/singles/blank.jpg"
name="pictures" width="500" height="50"><img
height="50" name="pictures2"
src="http://www.ashearchery.com/images/custom/singles/blank.jpg"
width="280" /></td>
</tr>
</table>
<table class="style1">
<tr>
<td>


<asp:DropDownList ID="picture" runat="server" onChange="showimage()">
<asp:ListItem Value="">Arrow Shaft</asp:ListItem>
<asp:ListItem Value="http://www.ashearchery.com/images/custom/singles/icshunter.jpg">ICS Hunter 400</asp:ListItem>
<asp:ListItem Value="http://www.ashearchery.com/images/custom/singles/icscamohunter.jpg">ICS Camo hunter 400</asp:ListItem>
</asp:DropDownList>


</td>
<td>
<asp:DropDownList ID="picture2" runat="server" onChange="showimage2()">
<asp:ListItem Value="">Wrap Style</asp:ListItem>
<asp:ListItem Value="http://www.ashearchery.com/images/custom/singles/icshunter.jpg">ICS Hunter 400</asp:ListItem>
<asp:ListItem Value="http://www.ashearchery.com/images/custom/singles/icscamohunter.jpg">ICS Camo hunter 400</asp:ListItem>
</asp:DropDownList>


</td>
<td>

</td>
<td>

</td>
<td>

</td>
</tr>
</table>
</form>
</body>
</html>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum