Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Manuel on Aug 27, 2008 01:08
open dhtmlx forum
dhtmlxMenu

Hi, I work an application with Struts and I use JQuery Framework for JavaScript. When insert my dhtmlxMenu I have error because not read XML File (XML File is created automatic)

The Structure is

<script>
..

</script>
<html:form>
...

<div id="menu_zone" style="width:600;border :1px solid Silver;"/>
<script>
        aMenuBar=new dhtmlXMenuBarObject('menu_zone',600,100,"Demo menu",0);
        aMenuBar.loadXML("_predeterminados.xml")
        aMenuBar.showBar();
</script>

...
</html:form>

Thank you for help me
Answer posted by Support on Aug 27, 2008 02:21
The  code is correct, and it is safe to use dhtmlxMenu with jQuery.
The problem may be caused by timing issue ( if you writing XML file dynamically, it may not exist or be locked in moment of reading )
You can try to use debug version of dhtmlxcommon.js and check what is really loaded from server side. 
        http://dhtmlx.com/docs/products/kb/index.shtml?cat=search&q=2545&ssr=yes&s=dhtmlxcommon
Answer posted by Manuel on Aug 29, 2008 11:37
Hi, thank you for help me. I resolved my problem using loadXMLString function. I saved the text of XML in hidden field. That's ok.

Thank you for your time.