menu 4.0 + xml

Hi,

did someone already succeeded to load a xml file after attachMenu() method and calling LoadStruct() method in versions 400 and or 401 ?

neither this version :

common_menu = layout.cells("a").attachMenu(); common_menu.loadStruct("xml/COMMON_menu.xml", function({ alert("ok"); }) );

nor this one :

common_menu = layout.cells("a").attachMenu({ xml: "xml/COMMON_menu.xml", onload: function(){ alert("ok"); } });

return “ok” with versions 400 or 401 of dhtmlx.js

Thanks

the sample files do not seem to work either … (IE 10)

See : dhtmlxSuite_v401_std\samples\dhtmlxMenu\01_init\01_init_from_xml_file.html

Hi,

Did you open a page via “http://” (under web server) ?

Hi Alexandra,

yes I did.

Server : MS 2k3 + IIS 6.0
Clients : IE 10, FF 3.5

http:// MY_SERVER/dhtmlxSuite_v401_std/samples/dhtmlxMenu/01_init/01_init_from_xml_file.html

returns only a grey bar, without menu buttons…
idem with 02_init_from_json_file.html example.

The following work well :
03_init_from_html.html
04_init_from_script.html

Thanks

Hi

online demos works fine, live demo also. have you tried them?
dhtmlx.com/docs/products/dhtmlxMenu/index.shtml
dhtmlx.com/docs/products/dhtmlxM … attrs.html

please send us completed demo or link to support@dhtmlx.com

I’m having the same issue, I only get a blue bar (dhx_skyblue) using IE 10 & IE 8. None of the buttons are showing.

Hi Andrei,

Online demos works fine, yes. I deduce that it is not a problem with client versions.

I tested on Apache Platform all sample files worked fine.

The problem seems to be on win 2k3 / IIS 6 side.

Then, I analyzed some client-server exchanges.
According to developper toolkit (F12 in IE) the problem deals with the xml file loading with POST method (server returns a HTTP Error 405 ). It indicates the use of the Library XMLHttpRequest.

I anderstand I have to check my IIS 6.0 config.
But I still do not know what exactly … Mime types ? folder access rights ?
I tried a few tricks gleaned on the web, but without success …

Any idea ?

Remark : all works fine with dhtmlx 3.6 on the same server; only 4.0 do not work.

Thanks

Hi

in two words:
IIS required some extra config for POST
we will add option to select get or post method for load/loadStruct into 4.0.2

step-by-step confguration below

  1. install IIS on fresh windows 8.1 (01.png, 02.png)
    control panel → add/remove programs → windows features (on left)
    select items from 01.png and click ok, windows will install some new files




  1. now go to control panel → administrative tools → iis manager (03.png)
    on left expand “site” and select from context menu “add new one” (04.png)
    there also was default site, but I removed it
    enter values like on screenshot 04.png and press ok




  1. now I checked in IE - IIS started, demo loaded but without xml
    as reported here (screenshot 05.png)


  1. to fix - go to sites → handler mappers (06.png)
    right_click or from menu on right side select “add module mapping” (screenshot 07.png)
    enter values like on screenshots 7,8 and 9 (components already installed in p.1)
    (if some values not reflected on screenshot - leave as-is)
    press main ok button, if you will see dialog like on 10.png - click yes










  1. no back to IE, hit F5 (11.png)
    one more important thing - add response type to xml like on 12.png




agree - too many actions for simple xml in a toolbar :slight_smile:
thanks for reading




The issue appears to be the major change from loadXML to loadStruct which has changed from a GET to a POST.
Unmentioned in the migration documentation, we got caught as well with the toolbar loaded but no buttons.
Had to make changes to the server so it responded to a local files POST and all was well.
I couldn’t find any method of loadStruct forcing to be a GET

download 4.0.2, as I mentioned above - we added ability to change
dhx4.ajax.method = “get”

Hi Andrei,

thanks a lot for your help.
I tested last week the configuration you advised for IIS.
It seems not to work well on 6.0 version, I crashed my IIS :unamused:
So I came back to the previous configuration.

I planned to update my server to win 2k12 with IIS 7.0; it will be easier to install new components… :sunglasses:

So a have a new question about menu 4.0.2 + window.dhx4.ajax.method = “get” :

If I do :

window.dhx4.ajax.method = "get"; common_menu = layout.cells("a").attachMenu({ xml: "xml/COMMON_menu.php", onload: function(){ ...

where COMMON_menu.php generate an usefull and custom xml,
nothing happen… :confused:
If I copy the generated xml from COMMON_menu.php in a xml file and call it, all is ok.

xml extension seems mandatory … I can work around that …
But is it possible to take into account for 4.1?

again thank you

Hi

please make sure COMMON_menu.php have codelines like:

header("Content-Type: text/xml");

if this will not help - please send us direct link or completed demo to support@dhtmlx.com

oh sorry, not awake

it works :smiley: