I have function "confirmLogout()" that it returns true or false. How to use this function in the mouseover drop menu?
Return to Recent Questions
Q:
I have function "confirmLogout()" that it returns true or false.
If it is false, the function does not make nothing. If it's true, I
need to direct for the page "goout.jsp". How to use this function in
the mouseover drop menu?
function confirmLogout() {
if(confirm('It really desires to leave? ?')) {
return true;
} else {
return false;
}
}
A:
Actually you can use your own Javascript code instead standard mouseover drop menu 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:
- Sep 02, 2006 - Little vertical spacers between menu items in the drop down menu.
- Sep 05, 2006 - Can I say to deluxe-menu "use wrapping"?
- Sep 06, 2006 - The alighment of the dropdown menu is off to the right in Firefox...
- Sep 06, 2006 - The first item of the html drop down menu stays highlighted.
- Sep 11, 2006 - How can I hide my dropdown menu on print?
- Sep 11, 2006 - If I use doctype the settings of the submenus in javascript dropdown menu get lost.
- Sep 17, 2006 - How can your javascript onmouseover menu be set to open by click?
- Sep 22, 2006 - How to call the function in my java script menu?
- Sep 23, 2006 - Is it possible that javascript drop down menus doesn't put anything on the local computer?
- Sep 23, 2006 - Is it possible that your menu call some javascript onmouseover event?
- Sep 26, 2006 - Firefox doesn't support the dropshadow and effects in the javascript pull down menu.
|