I'm creating a page on our site that embeds a google map of our location. The code works fine in Firefox and Safari. When loading the page in IE, I get an error "Internet Exploer cannot open the Internet site. http://www.... Operation aborted." I've located the line of code that generates the error. If I comment the line out it opens the map. The line is adding the bubble that has the address of our location. Even if I do a straight map.openInfoWindow instead of map.openInfoWindowHtml I still get the error.
I have searched everywhere and can't find anything. Any help would be much appreciated. Here is the URL to the page. Currently, I've got the line uncommented to you can see the error in IE. http://www.motorsportsland.com/locate.php
I have searched everywhere and can't find anything. Any help would be much appreciated. Here is the URL to the page. Currently, I've got the line uncommented to you can see the error in IE. http://www.motorsportsland.com/locate.php
Code:
function addMap() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map_canvas"),{ size: new GSize(540,500) });
//Sets the object of MSL location
var mslLocation = new GLatLng(40.684500, -111.888108);
//Centers Map to MSL location
map.setCenter(mslLocation, 13);
//Adds the Zoom and View Controls
var mapControl = new GMapTypeControl();
map.addControl(mapControl);
map.addControl(new GLargeMapControl());
//Adds the Pointer to MSL
map.addOverlay(new GMarker(mslLocation));
//Sets the Info that will display in the popup bubble in the map
var bubbleText = "<img width='75' src='http://www.motorsportsland.com/css/mslLogo.gif'<br /><b>Motor Sportsland</b><br /><br />4001 So. State<br />Salt Lake City, UT<br />84107";
//Creates the Message Window pointing to MSL
//THIS LINE GENERATES THE ERROR!!!
map.openInfoWindowHtml(mslLocation, bubbleText);
//Zooms in Once on the map
map.zoomIn();
}
}