Hi, I've developed code to replace the area elements of a given image map,
as well as the corresponding img element. Basically, I'm acessing the map
element from the DOM tree using the method document.getElementById('imagemap'), where imagemap is the map id.
After that, I'm getting a reference to the 'areas' array, start a loop on it
and remove all the area elements, with the removeChild method.
The new area elements are created after getting from the server(using AJAX)
their coordinates. Then the new area elements are appended to the image map object, replacing the old areas. The new image is loaded by simply changing
the src attribute. Everything is working fine, but for one problem: Internet Explorer crashes when the map is changed. Mozilla also crashes, but not immediately, as Internet Explorer does.
Does anybody have a clue for this problem? I can't seem what is happening, I've tried everything, even creating a new map element and replacing the old one, but the problem persisted.

Andre Soares

11-18-2007, 10:22 AM

steponit

Dynamic image maps

Hi,
Di you manage to fix this. I am having exactly the same difficulty. If you can please let me know how you fixed it. It is driving me up the wall. I have been trying for a week to get this working.
Many thanks:WAVE:

12-20-2007, 07:03 PM

nbfruit

The problem is this.

If you have multiple polygon areas in your map, and later areas have fewer co-ords than previous areas, clicking on any of the later areas in IE 6/7 will crash the browser.

I've seen a few posted solutions, but I have yet to try them.

Apparently, if you place you images inside SPAN elements, this can overcome the problem.