-
Swapping a map element (a DOM question)
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
-
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
-
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.
http://www.radixpub.com/vir/2007/08/10/crash-ie-67/
Similar Threads
-
Replies: 3
Last Post: 02-25-2007, 09:23 AM
-
Replies: 3
Last Post: 01-28-2006, 08:25 AM
-
Replies: 0
Last Post: 10-18-2002, 01:17 PM
-
Replies: 0
Last Post: 04-26-2001, 12:27 PM
-
Replies: 0
Last Post: 03-21-2001, 05:01 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|