Popup menus on Mouse Right-Click

You may use the AllWebMenus "Manually Trigger Main Menu (or any Group) on user action" feature to replace the default right-click menu used by the browser with a popup menu of yours!

Right-click anywhere on this page to view a popup menu appearing at the cursor position.

How it works:

  • Set the <Positioning> property to "Manually Trigger Main Menu (or any Group) on user action" before you compile the menu.
  • Compile the menu as popup_rightclick.js (for example) and link it to your HTML page.
  • Place the following code in the HEAD section of your HTML page:

<script>
function awmShowMenu(x,y,z,v){}
document.oncontextmenu = rightclickmenu;
function rightclickmenu(e) {if (document.all || navigator.userAgent.indexOf('Opera')>-1) {awmShowMenu('menu',event.clientX+Math.max(document.body.scrollLeft,document.documentElement.scrollLeft),event.clientY+Math.max(document.body.scrollTop,document.documentElement.scrollTop)); return false;}
if (navigator.userAgent.indexOf('Gecko')>-1) {awmShowMenu('popup_rightclick',e.pageX,e.pageY); return false;}}
</script>

(note: change the 'popup_rightclick' name if your compiled menu is named differently)

Well done! Now you have a popup menu appearing whenever a visitor right-clicks on the page.

See also:
Popup Menus appearing on Mouse Over
Hiding and showing different menus using code