Hi there,
I am currently trying to find out how to alter parts of an image url through the selection of a dropdown.
I have something where the first dropdown changes the entire url:
HTML Code:
<script language="javascript">
<!--
function ShowPic(sImage)
{
document.ShowRoom.src = sImage;
}
// -->
</script>
<form name="proof">
<select name="design" onChange="ShowPic(this.value)">
<option value="1">Option 1</option>
<option value="2">Option 2</option>
</select>
<select name="style">
<option value="a">Option a</option>
<option value="b">Option b</option>
</select>
<select name="finish">
<option value="z">Option z</option>
<option value="y">Option y</option>
</select>
</form>
<img name="ShowRoom" src="images/outsidefront.jpg">
But I need to change parts of the url depending on the 3 chosen options on the 3 dropdowns.
HTML Code:
<img src="http://www.domain.com/images/+variable++variable2++variable3+.jpg" />
Does anyone know a way to do this.