I'm trying to write some js that'll change the map an image uses on the fly. This is the stripped down version of my code:
--------------
<script language="javascript">
function change(choice)
{
window.document.menu.src = "images/" + choice + ".jpg";
window.document.menu.usemap = choice;
}
</script>
<map name="map1">
<area onMouseOver="change(map2)"> ----- </map>
<map name="map2"> ----- </map>
<img src=http://www.webdeveloper.com/forum/archive/index.php/"images/map1.jpg" ismap usemap="map1">
--------------
The image source changes fine, but the usemap never updates. I'm stuck with one map. Is it possible to change this dynamically.
Thanks!
Dan
--------------
<script language="javascript">
function change(choice)
{
window.document.menu.src = "images/" + choice + ".jpg";
window.document.menu.usemap = choice;
}
</script>
<map name="map1">
<area onMouseOver="change(map2)"> ----- </map>
<map name="map2"> ----- </map>
<img src=http://www.webdeveloper.com/forum/archive/index.php/"images/map1.jpg" ismap usemap="map1">
--------------
The image source changes fine, but the usemap never updates. I'm stuck with one map. Is it possible to change this dynamically.
Thanks!
Dan