October 17, 2005

IE Doesn’t Play Nice with Google Maps

Have you ever noticed that your web development time breaks down according to the following chart?

Initial development: 25%
Testing in Firefox: 1%
Testing in Internet Explorer: 10%
Rewriting to work around IE bugs: 64%

I’ve made my life easier by not even testing in IE anymore. That way my life is blissfully happy because I don’t see the IE bugs, and therefore I don’t have to work around them. The downside to this approach is that sometimes those bugs are showstoppers, and I don’t see them until an IE user points them out to me. And that’s why nobody using Internet Explorer was able to view the Around Carson Dining Guide during the last week.

You see, there’s something about the way Google Maps manipulates the DOM that IE doesn’t like, or something. I don’t really know if anyone’s tracked down the exact cause yet, but if you take the example code that Google gives you and just drop it into a page, Internet Explorer will give you an “Operation Aborted” error message and refuse to load the page. Like, it will refuse to load it all together, and it will give you a standard “This page could not be displayed” message in its place. After some digging I found the solution; you can’t just include the Javascript inline like Google tells you to. You have to make the script part of a function, and then call that function from an onload attribute. More details here. And here. And here and here.

Last week I put Google Maps on each page of the Dining Guide, so readers could have a handy map to be able to find the restaurant they were looking for. I tested the pages in Firefox, and everything was working perfectly. So I went to bed, blissfully unaware of what was happening to these pages in IE. For a full week I left the code untouched, and countless people came to the site, got the error, and were driven away. I just now fixed it, so it will work from here on out, until the next bug crops up and it takes me another week to find that one.

Isn’t Internet Explorer 7 out yet?

Filed under The Computer Vet Weblog

Comments (0)

Comments RSS - Write Comment

No comments yet

Write Comment