I have a tree with some nodes created dynamically, and i need to link every option to a diferent screen using id parameter.
As you can see, different children are created using the cursor and the loop inside. It works, the tree is ok, but the function ‘tonclick’ doesn´t work correctly.
The problem now is that the pages open automatically every time that the web is load, all of them, instead of when i choose the option. In fact, the links doesn´t work when i click on it.
tree.attachEvent(“onClick”,function(id){
if (id == 10)
{
var site = “bda_inicio_ayudas.ejecuta_opcion_menu?p_k=’||k||’&p_menu=GSOLICITUDUNICA&p_submenu=ENVIOSOLUN”
window.location.href(site)
}
else if (id == 20)
{
var site = “bda_inicio_ayudas.ejecuta_opcion_menu?p_k=’||k||’&p_menu=GSOLICITUDUNICA&p_submenu=CRUCESSOLU”
window.location.href(site)
}
})
Thanks again!
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan