How do assign my own onclick events to menu options for the dhtml menubar?
Return to Recent Questions
Q:
How do assign my own onclick events to menu options for the dhtml menubar? I want do more than just redirect to an href.
A:
Actually you can use your own Javascript code instead standard links. For example:
var menuItems = [
["text", "javascript:your_code_here"]
];
or
var menuitems = [
["<div onClick='your_code_here'>item text</div>", ""]
];
Return to Recent Questions
Related:
- Jan 27, 2007 - The Janarator image does not show javascript menu example
- Sep 26, 2007 - Is there any way to call a javascript function on mouseover dhtml menubar?
- May 05, 2009 - How I make to insert a code java in the event on click of the button "Ok", when this button is in tree dhtml menu bar?
- Jul 25, 2009 - While the page loads I can see all the content from all the <div> java menu bars and when the page if fully loaded, the web page then displays the content correctly.
- March 11, 2010 - Our website will be in three languages, English, French and Spanish..in actual webpage the accents in the dhtml menubar not right..
- October 23, 2010 - What i need is when the menu item is clicked in the dhtml context menu, it'll run a js on the onclick or mouseup event.
- December 7, 2010 - Where I can call function onclick other than in the menu target for dhtml menu script.
|