Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Robert Lewis on Jul 16, 2009 12:08
open dhtmlx forum
dhtmlxMenu version 2.1 problem

I'm having a problem initiating a menu. I have the include files in the head:

<script src="js/dhtmlxcommon.js"></script>
<script src="dhtmlxMenu/sources/dhtmlxmenu.js"></script>

and the CSS file

<link rel="stylesheet" type="text/css" href="dhtmlxMenu/codebase/skins/dhtmlxmenu_dhx_blue.css">

The error is "object expected", line 644 character 2 (I'm using the js file in the source directory - It errors in the same place if I use the one in the codebase directory, just gives a different line number).

line 644 is :     dhtmlxEventable(this);

I need a way to create the menu on the top of an ASPX page. I'm using visual studio 2005 and C#. I looked through the documentation and saw that you could populate the menu through an XML string, but didn't see an example. Is this still possible? If not, how would you go about populating the menu using C#? Thanks!

Robert Lewis
Answer posted by Alex (support) on Jul 17, 2009 01:42

hello,

probably you use some old version of dhtmlxcommon.js. Please use dhtmlxcommon.js from the same package as dhtmlxmenu.js

Answer posted by Robert Lewis on Jul 17, 2009 07:05

Yeah, sorry...I noticed that about 2 minutes after I posted.  I finally got the menu to work.

I need a way to create the menu on the top of an ASPX page. I'm using visual studio 2005 and C#. I looked through the documentation and saw that you could populate the menu through an XML string, but didn't see an example. Is this still possible? If not, how would you go about populating the menu using C#? Thanks!

Robert Lewis

 

 

Answer posted by Alex (support) on Jul 20, 2009 00:37

Hello,

yes, it is possible to load from xml string 

menu.loadXMLString(xml_string);

Also you can use loadXML method. You can generate xml stream using any server-side technology (Content-Type  should be text/xml):

menu.loadXML(path_to_script);