IE hangs when replacing ImageMap

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


I'm wondering how can I realise such scenario:
there is an image with a image map. I click on area and now current map is
switched by another imagemap where that area isn't already active. Right now
I'm doing something like this (using DOM):

<script type="text/javascript">
function setSrc(name) {
 var x=document.images
 x[0].useMap="#" + name;

But that code simply hangs IE6 (not Mozilla and Opera). So, how can I
replace this code to something more compatible with all browsers. You can
test this behavior here (click on Mapa 2

I was trying to use <div id="..."> and replacing .innerHTML with map
definition, but the result is the same.

Any ideas?

Radek Michalski

Site Timeline