...

View Full Version : IE7 Error: documentElement = null or not and object



KongFjong
10-08-2008, 08:43 PM
Hey there

I'm trying to develop a search-facility, where a user types a string in a form, and the string is used to search in a database. That's all good, and the output is good as well. A php file is creating an XML document, and when I call the php file directly in IE7 it shows and well formed XML doc.

http://validator.w3.org/check?uri=http%3A%2F%2Fwww.flush-it.dk%2Fxml%2FgetXMLData.php

Try calling the php file directly:

http://www.flush-it.dk/xml/getXMLData.php

My problem is, that when the Ajax function of Google Map, GDownloadUrl, tries to get the xml output, IE returns with the error that documentElement is not an object or is null, while Firefox (3.0.3) is working perfectly when searching.

If anyone can help me, I would be very happy:)

Regards

oesxyl
10-09-2008, 04:05 AM
don't work in iceweasel 2.0.18(firefox 2), content-type is text/html but I guess it must be application/xml. Since I never use nginx I don't know how you can fix it.

best regards

KongFjong
10-09-2008, 11:00 AM
don't work in iceweasel 2.0.18(firefox 2), content-type is text/html but I guess it must be application/xml. Since I never use nginx I don't know how you can fix it.

best regards

I've tried changing the content-type to xml, but it doesn't work. The weird thing is, that the code that extract the data:

fileXML = "http://www.flush-it.dk/xml/getXMLData.php";

GDownloadUrl(fileXML, function(data) {
alert(data);
var xml = GXml.parse(data);

var markers = xml.documentElement.getElementsByTagName("marker");

gets out valid xml in both ie7 and firefox, but ie won't catch the root element...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum