IE problem with XML
IE problem with XML
Can someone please help me with this issue?
I am using xml served from a php script to load markers onto my google map. It work beautifully in Firefox but the code fails on IE :
-
function initialize_all_venues() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(51.50002, -0.12618), 12);
map.setUIToDefault();
}
$.get("sites/all/themes/zen/zen/template_ajax.php",{},function(xml){
// Run the function for each venue tag in the XML file
$('venue',xml).each(function() {
//alert('checking : ');
VenueNid = $(this).find("nid").text();
venueName = $(this).find("name").text();
venueLong = $(this).find("long").text();
venueLat = $(this).find("lat").text();
var point = new GLatLng(venueLat, venueLong);
var marker ;//= new Array();
marker = new GMarker(point);
map.addOverlay(marker);
setMarkerDetails(marker, venueName, base_url+'/node/'+VenueNid);
});
});
}
function setMarkerDetails(marker, stuff, nid){
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml( "<a href='"+nid+"' target='_blank'>"+stuff+"</a>" );
//marker.openInfoWindowHtml( "testing" );
}
);
}
The code within the $('venue',xml).each(function() loop does not fire so the test alert in there doesn't work along with all the other code.