My Blog Title Here

November 20, 2008

If I want to pop up a link text, should I use alert(itemID[0])) in java navigation menu?

Filed under: Uncategorized — Tags: , — admin @ 10:25 am

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 java navigation 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>

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress