Hi
i'm trying to change image via selecting from dropdown list, the only problem is it's taking value from database but with out ".jpg" string here is my coding
RESULT LIKE CAME UP LIKE THIS
<img src="color/<%= comboName %>" name="pictures" >
how can i display including .jpg string with changing value
i'm trying to change image via selecting from dropdown list, the only problem is it's taking value from database but with out ".jpg" string here is my coding
Code:
<select id="cboColours" name="drpcolor" onChange="showimage()">
<option selected value="1">Make Selection</option>
<%=PopulateCombo(rsColours,"comboName","comboName")%>
</select>
<script>
function showimage()
{
if (!document.images)
return
document.images.pictures.src=
document.form1.drpcolor.options[document.form1.drpcolor.selectedIndex].value
}
</script>
<img src="color/<%= comboName %>.jpg" name="pictures" >
<img src="color/<%= comboName %>" name="pictures" >
how can i display including .jpg string with changing value
Comment