PDA

View Full Version : Modification of a Popup JavaScript?


resource
05-19-2003, 10:20 PM
I have a JS up and working to disable right clicking, but I really don't want to disable the right click function, all I want it to do is popup the a copyright message on a right click mouse event and leave the right click functions functional, to see the Popup & code that I've got working right click here : http://d3901543.u50.infinology.com/Index.htm

I've convinced the client not to disable the right click functions and
insted will protect his content on selected pages by creating the page in FX and converting the text to a gif, then use slicing of the gifs to make them virtually unsable to any cut and paste artists. Example: http://d3901543.u50.infinology.com/Newsletter1.htm

Here's the JavaScript Code:

<script language="JavaScript">
<!--
// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this header.

// ----------- Setups ------------------
// Set the address, width, height, top
// and left dimensions for the popup
// window below.
// -------------------------------------

PopUpURL = "http://d3901543.u50.infinology.com/CopyPopup.htm";
PopUpLeft = 200;
PopUpTop = 200;
PopUpWidth = 330;
PopUpHeight = 220;

// -------------------------------------
// Do not edit anything below this line.
// -------------------------------------

isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
popO='left='+PopUpLeft+',top='+PopUpTop+',width='+PopUpWidth+',height='+PopUpHeight

if (isIE||isNN){
document.oncontextmenu=checkV;
}else{
document.captureEvents(Event.MOUSEDOWN || Event.MOUSEUP);
document.onmousedown=checkV;}

function checkV(e){
if (isN4){
if (e.which==2||e.which==3){
dPUW=window.open(PopUpURL,'nrc',popO);
return false;
}}else{
dPUW=window.open(PopUpURL,'nrc',popO);
return false;}}

function MM_popupMsg(msg) { //v1.0
alert(msg);
}
//-->
</script>

Thanks in advance for your help! Jim

Skyzyx
05-20-2003, 04:04 AM
To be honest, most people on this board are pro-standards, and like myself, cringe when reading things like this. Let your client know that there is no way to protect their content except for not putting it up on the web.

Using graphics for text is as much a no-no in web design as much as using the <BLINK> tag... you just don't do it.

Based on that premise, I'm not willing to assist your client in doing what they want to do. Not to be a jerk or anything, but I would be committing what I consider to be a virtual sin...