Mark1968
06-19-2003, 08:06 PM
A corporate client wants me to protect the address of the source of a video presentation, or at least to make it a bit more difficult.
They suggested disabling right click on the frame, but unfortunately i have no control over the source code of the frame contents and when I try and use the following code, it has no effect.
I guess that the source code of the frame content takes precendence.
am = "This function is disabled!";
bV = parseInt(navigator.appVersion)
bNS = navigator.appName=="Netscape"
bIE = navigator.appName=="Microsoft Internet Explorer"
function nrc(e) {
if (bNS && e.which > 1){
alert(am)
return false
} else if (bIE && (event.button >1)) {
alert(am)
return false;
}
}
window.document.onmousedown = nrc;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (bNS && bV<5) window.onmousedown = nrc;
Can anyone suggest a solution, I know disabling right click is a bit naff and you can get around it, but it discourages all but the keenest. :rolleyes:
They suggested disabling right click on the frame, but unfortunately i have no control over the source code of the frame contents and when I try and use the following code, it has no effect.
I guess that the source code of the frame content takes precendence.
am = "This function is disabled!";
bV = parseInt(navigator.appVersion)
bNS = navigator.appName=="Netscape"
bIE = navigator.appName=="Microsoft Internet Explorer"
function nrc(e) {
if (bNS && e.which > 1){
alert(am)
return false
} else if (bIE && (event.button >1)) {
alert(am)
return false;
}
}
window.document.onmousedown = nrc;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (bNS && bV<5) window.onmousedown = nrc;
Can anyone suggest a solution, I know disabling right click is a bit naff and you can get around it, but it discourages all but the keenest. :rolleyes: