If you have a node with a map in it, when you try to view the page in IE6 (Windows XP SP2), you get this error:
Internet Explorer cannot open the Internet site http://www.example.com/example
Operation aborted
This problem has been widely discussed; the fix for it is to move the JavaScript code near the end of the HTML document instead of generating it immedately after the map DIV as the code currently does.
The attached patch implements this fix and allows the embedded maps to work on IE.
The patch also removes the ?> closing tag at the end of the module to conform to the latest Drupal style.
Comments
Comment #1
Geary commentedFor the patch-challenged, here is a copy of googlemap.module with the above patch already applied.
Comment #2
bensheldon commentedI don't know if this patch is really necessary. The root of the problem seems to be twofold:
1. Location module creates incorrect XML. It adds extra tags (icbm: & geo:) but does not add the spec in the header. This causes IE to barf with the "documentelement is null or not an object" error. Commenting out these additions in location.module (ugly, I know) fixes this problem.
2. All of Google's Map API examples (http://www.google.com/apis/maps/documentation/async.html) and every other site example I've looked at places the javascript in the header and just the div in the body. I tried doing this, using hook_onload to call the javascript in the body tag, and then just placed the div tags in the body. Works great in IE.
Comment #3
jacob.embree commented