|
|
If I want to pop up a link text, should I use alert(itemID[0])) in dhtml menu expand?
Return to Recent Questions
Q:
I want to use
function dtreet_ext_userRightClick(itemID) {
alert(itemID[0]); ???
return false;
}
But how do I refer to tmenuItems array using itemID in the javascript?
For example, if I want to pop a link text, should I use alert(itemID[0]))?
It doesn't work.
Please let me know how I refer to the menu.
A:
You should use the following function to get item's info:
dtreet_ext_getItemParams (0, itemID);
For example:
<script type="text/javascript">
function dtreet_ext_userRightClick(itemID)
{ var link = [];
link = dtreet_ext_getItemParams (0, itemID);
//Returns item parameters in the array:
// [item_id, index_within_submenu, parentID, level, has_child, child_count, expanded, text, link, target, tip, align, icons, hidden, disabled, visible]
alert(link[7]);
return false;
}
</script>
Return to Recent Questions
Related:
- Sep 05, 2006 - Change cursor to a hand when over a menu link...
- Sep 15, 2006 - Are vertical menus also supported? I don't see any in the javascript menu examples.
- Sep 22, 2006 - Where do I add my "blahblah.htm" page links in js menu?
- Sep 26, 2006 - Firefox doesn't support the dropshadow and effects in the javascript pull down menu.
- Sep 26, 2006 - Is there a way to change the height of the main buttons in my simple dhtml menu.
- Oct 01, 2006 - When I click on link of my vertical drop down menu no file is loaded!?
- Oct 06, 2006 - How can I use right-to-left languages in javascript popupmenu?
- Oct 12, 2006 - Can I create a scroll vertical menu on the right side and the subnav popout on the LEFT?
- Oct 20, 2006 - Can you let me know, if javascript moving menu supports search engine friendly code?
- Oct 20, 2006 - I want that tree menus expanded or collapsed and go to the link...
- Oct 21, 2006 - It appears that this javascript expand menu only supports IE (on the PC and Mac).
|