Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Rolf on Mar 03, 2008 14:25
open dhtmlx forum
Different Menu lay-out when using Javascript to construct a menu

Hi there,

I've a question concerning the methods available to load the menu-data.

The issue is that I'd like to construct a menu dynamically (the menu needs to be constructed
based on different variables such as language, user rights et cetera).

An XML-file is probably not the best way to do this, as this would mean that (A) I'd have to generate an
XML-file on-the-fly or (B) I should load a PHP-file with XML-output.
The last mentioned solution (B) simply doesn't work in Firefox (so this is not an option).

Another method for loading data into the dhtmlxMenu would be the javascript
initialization (as seen in the menu_building_script.html example file).

However, when I'd load menu data in this way, the menu looks different than when I would
use the regular way (XML-file) to load the menu data.

Is there any solution available to make sure that a javascript-constructed menu looks the same?

Thanks in advance.

Rolf


Answer posted by Support on Mar 04, 2008 02:03
Basically, when data loaded from XML it transformed to the same js commands, which used for creating menu from JS, so if you are using the same button types with same properties  as in XML - menu must be rendered the same, there is no any special tricks.