url link from dhtmlxWindow

Thanks alex, for the response you sent me,
Hello, 

You can use userdata tag to set url:


...


some.com


...





but when i try to implement it i get a blank page..


 


The xml code i put in is below


index2.html


and the code in my html is;


 


var menu = layoutWin.attachMenu();
   menu.setImagePath("dhtmlxMenu/codebase/imgs/");
  menu.setIconsPath("dhtmlxMenu/images/");
  menu.loadXML("dhtmlxMenu/dhtmlxmenu.xml");
  menu.attachEvent("onClick",function(id){
  var url =  id.getUserData(id,"url"))
  )}


 


Hello Lina,


there is the issue in the onClick event handler that you’ve set. Please, use the following


menu.attachEvent(“onClick”,function(id){
var url = menu.getUserData(id,“url”))
)}


instead of



menu.attachEvent(“onClick”,function(id){
var url = id.getUserData(id,“url”))
)}