The problem in question has been well-documented but most of the references I found to the solution linked to a website that is now defunct, so I thought I’d include my own solution below in case it’s of any use.
I’m running a Google Map on a page. The Google Map script is referenced in my page’s <head> as is my own script which generates a map and then does things with it. Pretty standard stuff.
However, in Internet Explorer 6 when you access the page you get the following message alert,”Internet Explorer cannot open the Internet site – operation aborted” and then you see a “Page cannot be displayed” message. The reasons for this are outlined in Nirmal’s post, How to Fix “Internet Explorer Cannot Open the Internet Site- Operation Aborted” Error.
I fixed it by moving both the call to the Google Maps Javascript and my own Javascript file to the end of the page, just before the closing <body> tag. I also threw in a defer=”defer” attribute to my own script reference just for extra safety. This will prevent IE from executing the script until the page has completed loading.
Tags: javascript, non-plone, web design.
[...] Go to the author’s original blog: “Internet Explorer cannot open the Internet site” error [...]
I am now facing the same problem in my blog. I have no knowledge of javascript and am not a techie. Could you please explain to me how to locate the Google maps Javascript and my own Javascript file? Also, where should I type the defer=”defer” attribute? Thanks for your help.
Hi there,
The Google Maps documentation explains this in more depth, but you reference the main Google Maps Javascript file in a script tag in your page — probably best just before the closing body tag if you’re getting the problem referred to above.
Your call to the Google Maps Javascript must naturally come before the call to your own Javascript file. You place the “defer” attribute in the script tag itself, e.g.:
<script type=”text/javascript” src=”http://maps.google.com/maps?file=api&v=2&key=abcdefg” defer=”defer”></script>
<script type=”text/javascript” src=”/path/to/javascript-file.js” defer=”defer”></script>
the “key=abcdefg” in the first statement should be replaced by your own API key.
Hope this helps,
David
Six other fixes for the problem, both for the browser and the webmaster, see here: http://motls.blogspot.com/2008/08/fix-internet-explorer-7-with-sitemeter.html
easiest fix i’ve found so far is to change v=2 to v=2.118 in the google maps javascript include. no need to mess around with adding defer attributes or moving your scripts.
Hi Jessica, thanks for the tip. I’ll check this out.
@jessica – thank you. That fixed my problem immediately. Well spotted.
Jessica – YOU ARE MY HERO!
Mine 2 – Easy really does it
– Thank you
It is sometimes the lightbox code too