I want to add a javascript link with onclick event to the menu horizontal
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 menu horizontal?
I want to add a javascript link in the menu horizontal 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 menu horizontal 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 java script menu in DHTML Tuner.
- March 14, 2009 - I am having a problem with css styles in the pop up menu javascript.
- March 15, 2009 - I have problems with transitional effects in Firefox in the menu web...
- March 26, 2009 - After click the links the dropdown menu download stops showing up in cross-frame mode...
- March 27, 2009 - I can't validate my pages with W3C or WDG validators using menus using css...
- March 28, 2009 - Is it necessary to add dmWorkPath parameter in the css pulldown menu?
- March 29, 2009 - How could I call a script instead of specifying a link in cascade menu javascript myspace?
- Apr 05, 2009 - We have status bar errors that say: "Done, but with errors on page" in html side menu...
- Apr 06, 2009 - Can the link items NOT open a new window in the dynamic menu javascript?
- Apr 07, 2009 - I want to get my text within a single navigation web part item to be on a two lines...
- Apr 15, 2009 - My mainmenu items are not links. So I need no link cursor for these menu in css items.
|