(c) 2016, Deluxe-Menu.com
Search  
Ctrl+F2 - enter/switch menu | Arrow keys - navigate | Esc - exit menu  
  Support
  FAQ
  Contacts
  About Us
  Recent Questions


 

    Is there a way we can add javascript behaviors to the popup menu in java actions?

Return to Recent Questions


Q: Is there a way we can add javascript behaviors to the popup menu in java actions? For example, is there a way we can add an onClick function to a popup menu in java item (eg, onClick="return MyFunction( )" ) so that we can catch and process key events?

I'm really hoping there's a way of doing this...

A: Unfortunately, you can't assign onmouseover/onClick/onContextMenu event to each item. However, you can achieve this by using standard html objects within popup menu in java items, for example:

var menuitems = [
["<div onContextMenu='your_code_here'>item text</div>", ""]
];

You can use your own Javascript code instead standard links. For example:

var menuItems = [
["text", "javascript:your_code_here"]
];






Return to Recent Questions

Related:
List of 15 AI Website Creators and Generators - Reviews, Comparison, Pros & Cons. List of 20 AI Code Builders and Generators - Code generated faster with AI.  |  Best AI website generator and creator - create a website with AI.  |  AI website builder and generator - AI-driven websites, limitless possibilities .  |  Best Website Builder for Digital Marketing Agencies, Travel Agencies, Interior Designs  |  Best AI Website Builder - Create Website Design with AI  | 
Copyright (c) 2019, Deluxe-Menu.com
Home  |  Product Info  |  Samples  |  Download  |  Purchase  |  FAQ  |  Site Map  |  Terms of Use  |  Write Us
All rights reserved. Best AI Website Builder | AI Website Builder | AI Website Maker | Website Generator AI | AI web design generator