Timmie Posted June 13, 2006 Share Posted June 13, 2006 I've found a workaround for the bug in IE that I posted a few days ago. What happens is: if you have more than one area for an image map that change the map for the image, only the first works and the rest will crash IE.Below is and example code (you can use any .gif, just rename it to anygif.gif).The top half of the image is one area and the bottom half is another. Click the top half and the area changes to a rectangle in the center of the image. Click that and the areas change back. Clicking the bottom half of the area crashes IE. Remove the comment markers from the script and no more crash!BTW: Anyone know how to report this bug to Bill? (like it would do any good). <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head> <title>IE bug Example</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script type="text/javascript"> function switch1() { /*document.getElementById( 'img01' ).style.display = "none";*/ document.getElementById( 'img01' ).useMap = "#map1a"; /*document.getElementById( 'img01' ).style.display = "block";*/ } function switch2() { document.getElementById( 'img01' ).useMap = "#main_map"; } </script></head><body><img alt="image 01" id="img01" src="anygif.gif" usemap="#main_map" border="0" width="300" height="300" ><map id="main_map" name="main_map"> <area alt="area01" shape="rect" coords="0, 0, 299, 149" href="JavaScript:switch1()" /> <area alt="area02" shape="rect" coords="0, 150, 299, 299" href="JavaScript:switch1()" /></map><map id="map1a" name="map1a"> <area alt="area03" shape="rect"coords="100, 100, 200, 200" href="JavaScript:switch2()" /></map> Link to comment Share on other sites More sharing options...
Jack McKalling Posted June 13, 2006 Share Posted June 13, 2006 So basically, you mean that changing the map of an image will crash IE, but if you hide the image first it won't? Link to comment Share on other sites More sharing options...
Timmie Posted June 13, 2006 Author Share Posted June 13, 2006 So basically, you mean that changing the map of an image will crash IE, but if you hide the image first it won't? <{POST_SNAPBACK}> Exactly. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now