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
Right click menu functionality
Moderator: General Moderators
- neel_basu
- Forum Contributor
- Posts: 454
- Joined: Wed Dec 06, 2006 9:33 am
- Location: Picnic Garden, Kolkata, India
Full HTML Source For Right Click Page
Keep All Your right Click Items In the right_click function
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>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