NerdyNick


Just incase others are having the same problem with getting the error message "Internet Explorer cannot open the Internet site. Operation Aborted" in IE7. I have come across a work around that was posted in one of the forums on MSDN.

To get around this error you have to add your VEMap.LoadMap(); call to the onLoad of the page.

Here is a slim version of what I used to get it to work.

var oldonload = window.onload;

if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function(){
oldonload();
mapObj.LoadMap();
}
}

Hope this helps solve a lot of problems.




Re: "Internet Explorer cannot open the Internet site" Error

SoulSolutions


Yes its a big issue.

That code is actually outdated, checkout the WIKI for the best way to do it.

http://www.viavirtualearth.com/wiki/DeferScript.ashx

Feel free to add any more tips and snippets to the wiki.

John.







Re: "Internet Explorer cannot open the Internet site" Error

ldsdanz

hiya, I recieve the same prompt when I try to get on to my IGoogle page.

Would you have any links or advice on how to remedy this problem (I have no clue what you said to do in your previous post --- sorry).

thanks nick!

- carol







Re: "Internet Explorer cannot open the Internet site" Error

NerdyNick

Are you trying to create your own Google Homepage item or are you using one someone already created.

If this is of your own createn. You need to have any events that attempt to access elements on the page (that may not have already been added to the DOM) to the onLoad event of the document. This seems to be the problem that was happening with VE.





Re: "Internet Explorer cannot open the Internet site" Error

SoulSolutions

Ok for those that don't already have it here is a tried and tested method of launching some javascript function on load and unload to avoid operation aborted:

Code Snippet

function Page_Load()
{
//do stuff
}

function Page_Unload()
{
//clean up objects
}

//set event handlers
if (window.attachEvent) {
window.attachEvent("onload", Page_Load);
window.attachEvent("onunload", Page_Unload);
} else {
window.addEventListener("DOMContentLoaded", Page_Load, false);
window.addEventListener("unload", Page_Unload, false);
}

John.