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?
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 …>some url here
or by the script menu.setUserData(id,“url”,“inbox.cfm”);