Saturday, December 1, 2007

Google Maps Not Working in Internet Explorer, Operation Aborted

This has been bothering me for a while now. This is about the phpGoogleStoreLocator script that I have been working on integrating into a site the past few days. Just when everything was fine and seems to be working properly, it wouldn't function on Internet Explorer. Everytime I open it, it just crashes. I let other people try it and they experience the same thing.

So after googling around I found out that this problem usually occur when you have a script tag inside your tables. This was not the case on my part but I'll be sure to look out for this one. Apparently the solution to my problem is to put the map initialization code into a function say "loadMap()" and attach it to the body tag like this .

Other solutions to the problem if the the ones above still won't work for you are :

  1. Enclosing with a div tag where you want your map to appear. Something like this one : <div id=”map” style=”width: 400px; height: 400px”> and then make sure that all your javascripts are at the bottom of your document below the body tag. Thanks to Ryan.
  2. Moving the map function in the window.onload() handler. Thanks to Justin.
These solution will mostly work but if it still won't try to visit the Microsoft support site here.

No comments: