I have a select with a OnChange Function. I would like to know how to create a different object depending on the selection on the Select.


MySelect have Option 1 and Option 2, so

If (Myselect.value == Option 1)
{Create Object 1}
If (Myselect.value == Option 2)
{Create Object 2}

I'm using the object under <body> and it's working, but when I'm trying to use it under a <script> does not work.

This is the object I'm trying to create: (It is a map) so what I'm trying is to change the values or map depending on the selection of the Select.

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="900" height="600" id="zoom_map" align="top">
<param name="movie" value="us_albers.swf?data_file=senate.xml" />
<param name="quality" value="high" />
<param name="bgcolor" value="#FFFFFF" />
<embed src="us_albers.swf?data_file=senate.xml" quality="high" bgcolor="#FFFFFF" width="100" height="100" name="Clickable U.S. Map" align="top"

Thank you very much