IE 6 and 7 Imagemap crash issue
Friday, December 21st, 2007Imagemaps are a bit old hat these days, but they still have their uses and this IE bug can be a real killer.
If you dynamically create an Imagemap using Javascript, IE has a problem with polygon areas that have different number of co-ordinates. Basically, IE will crash if you click on an area that has fewer co-ordinates than a previous area.
To get around this, don’t use DOM element properties to create your Imagemap:
Don’t use:
map_image.isMap = ‘ismap’;
map_image.useMap = ‘#layer0′;
etc
Put your IMG tag inside a SPAN instead, and update it using the innerHTML property.