Hi i using onTouch,onClick events to know parentId, but don�t work for middle levels for example
>Inicio:1
>Primero:2
>Segundo:3
>Tercero: 4
The events show Id for 1,3, and 4, But >Primero:2 don�t show nothing, how do it to get parentId for Item >Primero:2
Thanks.
Jorge Arzuaga
Hello
Could you please provide the complete demo ? It’ll allow us to re-create the problem easily.
menu_muestra.attachEvent(“onTouch”, changeParent);
menu_muestra.attachEvent(“onClick”, changeParent);
var parentId = null;
function changeParent(id) {
parentId = id;
var text = menu_muestra.getItemText(id);
document.getElementById(“item_parent”).innerHTML = text;
document.getElementById(“item_parent”).innerHTML += " - Pos. Actual: "+menu_muestra.getItemPosition(id);
}
>Inicio:1
>Primero:2
>Segundo:3
>Tercero: 4
The events show Id for 1,3, and 4, But >Primero:2 don�t show nothing, how do it to get parentId for Item >Primero:2
to examples in dhtmlxMenu in section Items>Menu Items Manipulations
Here i can add a Items for example to item “Open” but i don´t add more items to “Open” because i can´t selected parenId for item “Open”
dhtmlx.com/docs/products/dht … tions.html
Hello,
If you want to enable onClick event for middle level, you can modify the following line in the dhtmlxmenu.js, _doOnClick method:
if (type.charAt(0)==“c”) { return; } // can’t click on complex item
try to replace it with:
if (type.charAt(0)==“c”) {this.callEvent(“onClick”, [id]); return; } // can’t click on complex item
In this case onClick will be called.
Thanks… it’s work perfectly…
Jorge Arzuaga