Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Erkan Cengiz on Jul 23, 2009 01:43
open dhtmlx forum
Setting User Data with XML for dhtmlxMenu

Is there a way to set user data with XML for dhtmlxMenu.

<menu>
<item id="m1" text="Home">
<item id="m11" text="Products" href="display.doms?pg=PRODUCTS"/>
<item id="ms1" type="separator"/>
<item id="m12" text="Contact" href="display.doms?pg=CONTACT"/>
</item>
</menu>

so that we could use it as follows

function OnClick(id) {
document.location.href = menu.getUserData(id,"href")
}
Answer posted by Alex (support) on Jul 23, 2009 02:10

Hello, 

try to use <userdata> tag:

<item id="m11" text="Products" href="display.doms?pg=PRODUCTS">

<userdata name="href">http://some.com</userdata>

</item>