Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Greg Simmons on Jan 16, 2008 06:28
open dhtmlx forum
Firefox getting Incorrect XML although it is working in IE.

I keep getting an Incorrect XML message when I run the dhtmlxcombo with dynamic (ajax) autocomplete in firefox.

When I use the mozilla firebug (javascript debugger) I see that the xmlDoc.ResponseText = "<?xml version="1.0" encoding="ISO-8859-1"?><complete><option value="35">*Network Monitor</option><op..."  but the xmlDoc.ResponseXML = null.

Am I doing something wrong in my encoding.  I'm using an ASP that creates the same output as your PHP example, and it works in IE, just not in Firefox.

Answer posted by Support on Jan 16, 2008 08:17
The FF has only one critical requirement - there must not be any output or whitespaces before xml declaration (<?xml)
(firebug use HTML for result rendering , so trailing whitespaces can be missed while checking results in it)

You can  try to fully remove "<?xml version="1.0" encoding="ISO-8859-1"?>" from your XML output, it such case FireFox will parse XML correctly event if some whitespaces outputed before XML start.

The second possible issue - content type of server side script, please be sure that it set to text/xml ( it mostly related to IE , but maybe somehow cause issues in your case as well )