loadXML not working in Firefox but fine in IE

I have a external JS src reference in the head of the page (default.asp). This calls a .js file containing an initMenu() function (script.js). initMenu() is called from the of default.asp.

Within the initMenu() function is a menu.loadXML command which calls the XML structure for the menu.

When I open default.asp in IE, the menu works fine. However, when I open it in FF or Safari on the Mac, the menu background appears, but no menu items. It appears that the menu.loadXML command does not work. I tried putting an alert immediately before and after the menu.loadXML line. This triggers both times in IE, but only when placed before the menu.LoadXML line in FF/Safari (and not after).

Any thoughts?

Probably the xml isn’t correct.

Please, take a look at the following article. Possibly it is help to resolve the issue: dhtmlx.com/docs/products/dhtmlxG … rt_comprob

If the problem still occurs, please provide generated xml that you try to load

Nothing in that link seems to apply. I don’t get an Incorrect XML error. I have validated the XML and it checks out. As this is an intranet application, I don’t want to post the XML in a public forum. Can you give me an email address I can send it to please?

You can send xml to support@dhtmlx.com.

I solve this problem changing headers in loadXML(yourpage or xml), using Content-type: text/xml  , because IE automatically change headers to XML but FF doesn’t.

Hi Roberto,

I have the same problem, works fine in IE but no in Firefox.
This is a sample of my xml:

<?xml version="1.0" encoding="iso-8859-1"?>
<complete xmlns="http://www.w3.org/1999/xhtml">
<option value="1">Acapulco</option>
<option value="49">Aguascalientes</option>
<option value="46">Campeche</option>
<option value="2">Cancun</option>

And this is the code I am using:

<div id="combo_zone1" style="width:214px;"></div>
   var frmComboDestinations_1=new dhtmlXCombo("combo_zone1","DestinationsList",214);
   function doAfterLoading(){
      frmComboDestinations_1.setComboValue('Type the name of city or destination');


Where did you change the headers?

Thanks for your help :wink:


if you load xml from static xml, header shouldn’t be set. Try to change the xml as follows to solve the problem:

<?xml version="1.0" encoding="iso-8859-1"?> Acapulco Aguascalientes Campeche Cancun