|
I want to add a javascript link with onclick event to the drop down menu in html
Return to Recent Questions
Q:
I just want to grab the current page, insert it into a string, and go off to the page it
specifies. Can this be done in drop down menu in html?
I want to add a javascript link in the drop down menu in html but cannot seem to get it
handle the event as a tag or onclick event.
A:
You're able to use Javascript calls for each item, for example:
var menuitems = [
["item text", "javascript:your_code_here"]
];
You can't assign onmouseover/onClick event to each drop down menu in html item.
However, you can achieve this by using standard html objects within
items, for example:
var menuitems = [
["<div onClick='your_code_here'>item text</div>", "index.html"]
];
Return to Recent Questions
Related:
- March 12, 2009 - I have problems with image paths when I create dhtml menu code in DHTML Tuner.
- March 14, 2009 - I am having a problem with css styles in the javascript select menu.
- March 15, 2009 - I have problems with transitional effects in Firefox in the right mouse button menu...
- March 26, 2009 - After click the links the javascript scroll menu stops showing up in cross-frame mode...
- March 27, 2009 - I can't validate my pages with W3C or WDG validators using menu vertical javascript...
- March 28, 2009 - Is it necessary to add dmWorkPath parameter in the dhtml javascript menu?
- March 29, 2009 - How could I call a script instead of specifying a link in html popup menu myspace?
- Apr 05, 2009 - We have status bar errors that say: "Done, but with errors on page" in dhtml flyout menu...
- Apr 06, 2009 - Can the link items NOT open a new window in the html navigation menu?
- Apr 07, 2009 - I want to get my text within a single javascript right click menu item to be on a two lines...
- Apr 15, 2009 - My mainmenu items are not links. So I need no link cursor for these html mouseover items.
|