How to fix “operational abort” for Google Map in IE

The first task that I have to day is to fix Google Map “Operational Abort” in IE (Internet Explorer). It took me awhile to understand what happened at the back of it.

This is how to produce the error:

Go to any page with Google Map using the Internet Explorer.

Then go to another page, for example, by clicking the link from that page.

Hit “Back” to go back to Google Map page.

You will then receive “Operational Abort” error.

To solve it, I used the WindowOnload fix from: http://blog.firetree.net/2005/07/17/javascript-onload/

Here is how I used it, assuming that the code structure looks like this:

HTML HEAD

SCRIPT to include GMap Code

SCRIPT to ask GMap to do a cool trick – include GMap_init() function

HTML BODY

DIV your map is here

END HTML BODY

END HTML HEAD

The edited code:

HTML HEAD

HTML BODY

DIV your map is here

SCRIPT to include GMap Code

SCRIPT to ask GMap to do a cool trick

function WindowOnload(f) {
var prev=window.onload;
window.onload=function(){ if(prev)prev(); f(); }
}

WindowOnload(GMap_init); // call init() function.

END HTML BODY

END HTML HEAD

Feel free to try that out and let me know if it works 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: