Categories | Question details Back To List | ||
Click event in dhtmlxmenu I am trying to use the menu item attached to a layout. I can load the menu with data without issue. My questions is when you click on an item in the menu how do you get it to go to a cell in the layout. I can use layout1.cells("b").attachURL("inbox.cfm"); to do it from layout cell to layout cell but how do I do it from the menu item? Answer posted by Alex (support) on Oct 26, 2009 09:25 You can set onClick event handler: menu.attachEvent("onClick",function(id){ var url = menu.getUserData(itemd,"url"); layout1.cells("b").attachURL(url); }) Userdata can be set in the xml: <item ...><userdata name="url">some url here</userdata></item> or by the script menu.setUserData(id,"url","inbox.cfm"); |