Is there any way to call a javascript function on mouseover dhtml menubar?
Return to Recent Questions
Q:
Is there any way to call a javascript function on mouseover from a menu item?
A:
You can use your own javascript functions in the menu items.
You should paste "javascript:some_function()" into item's link field, for example:
var menuItems = [
["text", "javascript:your_function(...)", ...]
];
var menuItems = [
["item text", "javascript:alert('Hello World')", , , , ,]
];
Unfortunately, you can't assign onmouseover/onClick event to each item.
However, you can achieve this by using standard html objects within
items, for example:
var menuitems = [
["<div onMouseover='your_code_here'>item text</div>", "index.html"]
];
Return to Recent Questions
Related:
|