Change image on dropdown
<p>I have a dropdown option box in my CS-Cart install that has dynamically created values, e.g. 3110, 3111, 3112, 3113....</p>

<p>I need to change an image below the dropdown based on the chose value from the dropdown. </p>

<p>I was looking at this script - <a href="http://www.javascriptkit.com/script/cut173.shtml" rel="nofollow">http://www.javascriptkit.com/script/cut173.shtml</a> but using that would depend on using manually created values. (see below for coding)</p>

<p>Script:</p>

<pre><code>&lt;script language="javascript"&gt;
&lt;!--
function showimage()
{
if (!document.images)
return
document.images.pictures.src=
document.mygallery.picture.options[document.mygallery.picture.selectedIndex].value
}
//--&gt;
&lt;/script&gt;
</code></pre>

<p>HTML:</p>

<pre><code>&lt;table border="0" cellspacing="0" cellpadding="0"&gt;
&lt;tr&gt;
&lt;td width="100%"&gt;&lt;form name="mygallery"&gt;&lt;p&gt;
&lt;select name="picture" size="1" onChange="showimage()"&gt;
&lt;option selected value="image1.gif"&gt;Picture of me&lt;/option&gt;
&lt;option value="image2.gif"&gt;Picture of my aunt&lt;/option&gt;
&lt;option value="image3.gif"&gt;Picture of my brother&lt;/option&gt;
&lt;/select&gt;
&lt;/p&gt;
&lt;/form&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="100%"&gt;&lt;p align="center"&gt;&lt;img src="image1.gif" name="pictures" width="99" height="100"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p>What do I need to do so it references the value in the dropdown? this Is for a one off product and only needs to be done for this one so there is no worries about values changing etc...</p>

<p>This is the code that is generated on the front end of the page that I need to associate the scripting to:</p>

<pre><code>&lt;select name="product_data[29821][product_options][742]" id="option_29821_742" onchange="fn_change_options('29821', '29821', '742');" &gt;
&lt;option value=""&gt;Choose...&lt;/option&gt;                                                                     &lt;option value="3111" &gt;LC &lt;/option&gt;
&lt;option value="3110" &gt;LC/A &lt;/option&gt;
&lt;option value="3112" &gt;E2000 &lt;/option&gt;
&lt;option value="3113" &gt;E2/A &lt;/option&gt;
&lt;option value="3114" &gt;FC /option&gt;
&lt;option value="3115" &gt;FC/A &lt;/option&gt;
&lt;option value="3116" &gt;ST &lt;/option&gt;
&lt;option value="3117" &gt;SC &lt;/option&gt;
&lt;option value="3118" &gt;SC/A &lt;/option&gt;
&lt;/select&gt;
</code></pre>
