Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Ian Davies on Jul 14, 2009 01:42
open dhtmlx forum
enable onClick event for top level menu item

Hi,

I want to use an onClick event for the top level menu item.  This is currently disabled if the menu has one or more items.

What js file do I need to be able to use menu.enableWindowOpenMode(false);?  At the moment I get the following error when I try to call it:-

'Object doesn't support this property or method'.

Is this because I'm using the development version of dhtmlxmenu?







Answer posted by Alex (support) on Jul 14, 2009 03:59

Hello, 

enableWindowOpenMode is not supported in menu v.2.1 (this method was provided in the old menu v. 1.0)

To enable onClick event for top level items you can use comment the following line in the dhtmlxmenu.js (line 371):

if (type.charAt(0)=="c") { return; } 

Answer posted by Ian Davies on Jul 14, 2009 04:52
Thank you for your help - that works great