JavaScript Code, Web

Google Maps causes Internet Explorer to crash

I was working on a site the other day, and I came across the error on a page that I've never seen before. The page had an embedded Google Map, and there was a JavaScript function to display the map. The page worked in FireFox, but when I ran it in IE, I got the following JavaScript error:

Internet Explorer could not open the internet site.
Operation aborted.

And not one bit of the page would display.

I dug around online, but couldn't find anything. On a complete whim, I decided to try to move the showMap() function into the window.onload() handler. And crazily enough, it worked! So the whole error was caused by the showMap() being run before the page had fully loaded. Insane…

Share

3 Comments

  1. A great pick up Justin. So good I made a Digg about it and it points to here!

    Col 🙂

  2. Cheers for the tip, saved me a headache or two.

  3. Another sort of "on a whim" solution found here:

    http://vidmar.net/weblog/archive/2005/08/22/2121.aspx

Leave a Reply

Your email address will not be published. Required fields are marked *

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image