This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: How to Disable Right Click in browser window using java script
- From: Aradhana Liyanage <aradhanal at eurocenter dot lk>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Mon, 18 Mar 2002 10:05:01 +0600
- Subject: RE: [xsl] How to Disable Right Click in browser window using java script
- Reply-to: xsl-list at lists dot mulberrytech dot com
this will help u
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
function click(e) {
if (document.all) {
if (event.button==2||event.button==3) {
oncontextmenu='return false';
}
}
if (document.layers) {
if (e.which == 3) {
oncontextmenu='return false';
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
function handleKeyDown() {
if (window.event.keyCode == 116) {
event.keyCode=0;
event.returnValue=false;
}
}
document.onkeydown = handleKeyDown;
</SCRIPT>
</HEAD >
<BODY BGCOLOR="#E0E0E0" TEXT="#000080" oncontextmenu="return false"
ondragstart="return false" onselectstart="return false">
U can not right click on this page
</BODY>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list