Jump to content

Image linked to form.


keane89wolves

Recommended Posts

This may be incomplete, but contains functions to get you started/

 

<script type="text/javascript">
function swapImage(arg)
{
  var x = document.getElementById(arg);
  var y = x.options[x.selectedIndex].value);
  var z = document.getElementById("swapper");
    z.src = y;
}
</script>

 

<select name="list1" onchange=swapImage('list1')>
<option value=image1.jpg>Picture 1</option>
<option value=image2.jpg>Picture 2</option>
</select>

<img src="image3.jpg" id="swapper" />

Link to comment
https://forums.phpfreaks.com/topic/112200-image-linked-to-form/#findComment-576395
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.