IE - operation aborted (Sorry!!!)
Right, I've read the group many times (ok maybe not the whole group!),
and moved my code around all day trying to monkey a fix, but still
getting problems in IE6...
Here's the most recent code layout, with all script in a function
stored in the head, and called from onload in the body..it's very
simple so with any luck the error will jump out!
thanks for any advice you can give,
chris
******************
<%@ Page Language="VB" AutoEventWireup="false"
CodeFile="newGoogle.aspx.vb" Inherits="newGoogle" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<style type="text/css">
v\:* {
behavior:url(#default#VML);
}
</style>
<script for google maps with key></script>
<script type="text/javascript">
function doEverything(){
//<![CDATA[
if (GBrowserIsCompatible())
{
var map = new GMap(document.getElementById("map"));
map.centerAndZoom(new GPoint(-1.6, 54.9), 6);
map.addControl(new GSmallMapControl());
}
//]]>
var request = GXmlHttp.create();
request.open("GET", "getXMLMarkers.aspx", true);
request.onreadystatechange = function()
{
if (request.readyState == 4)
{
var xmlDoc = request.responseXML;
var markers = xmlDoc.documentElement.getElementsByTagName("marker");
for (var i = 0; i < markers.length; i++)
{
var point = new GPoint(parseFloat(markers[i].getAttribute("lng")),
parseFloat(markers[i].getAttribute("lat")));
var htmlmessage = i;
var marker = createMarker(point,htmlmessage);
map.addOverlay(marker);
}
}
}
request.send(null);
function createMarker(point, info)
{
var marker = new GMarker(point);
GEvent.addListener(marker, "click",
function(){marker.openInfoWindowHtml(info);});
return marker;
}
}
</script>
</head>
<body onload="setTimeout('doEverything()', 500);">
<div id="map" style="width: 1000px; height: 650px"></div>
</body>
</html>
0 Comments:
Yorum Gönder
<< Home