Page 1 of 1

Right click menu functionality

Posted: Fri Dec 08, 2006 3:58 am
by Nunners
I'm creating a number of applications using php and (obviously) html/javascript and one thing that would be nice, and would cause less of a headache in layout, would be the ability to have right-click functionality - like in MS Exchange Web view (it's only on Internet Explorer though).

Can anyone point me in the direction of somewhere that explains how to create right-click-menu functionality in IE & any other browsers, if it's possible?

Thanks
Nunners

Posted: Fri Dec 08, 2006 6:47 am
by feyd
I believe it's called context menu in many areas of discussion.

Posted: Sat Dec 09, 2006 5:30 am
by neel_basu
Full HTML Source For Right Click Page

Code: Select all

<html>
<head>
<title></title>
<SCRIPT LANGUAGE="JavaScript1.2">
function right_click()
  {
    window.alert("Hello");
    //Your Right Click Statements goes here
    return false;
  }
</script>
</head>
<body>
<script language="JavaScript1.2">
document.oncontextmenu = right_click;
</script>
</body>
</html>
Keep All Your right Click Items In the right_click function

Code: Select all

function right_click()
  {
    window.alert("Hello");
    //Your Right Click Statements goes here
    return false;
  }

Code: Select all

document.oncontextmenu = right_click;//Captures The Right Click

Posted: Sat Dec 09, 2006 6:39 am
by neophyte
Typo 3 uses this through out their administration area.

Posted: Sat Dec 09, 2006 6:48 am
by neel_basu
Hey Whats Typo 3