Resource
05-21-2003, 12:12 AM
I found a JS I would like to use, I've got it working online with no problems. However I really don't want it to disable the right click functions, On a right click event I just want it to pop up the custom HTML message page where I want it and leave the right click user functions 100% functional.
What do I need to change in this code to accomplish this?
Would I be better off starting from scratch or does another script already exist that does what I want more effeciently?
I understand about half of what's going on in this script but simply don't know enough JS yet, besides time is in very short supply if you know what I mean, otherwise I wouldn't be asking.
TIA for your help, Jim
Code below:
<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>
FUNCTIONING EXAMPLES:
http://d3901543.u50.infinology.com/Index.htm
http://d3901543.u50.infinology.com/Newsletter1.htm
Popup HTM file:
http://d3901543.u50.infinology.com/CopyPopup.htm
What do I need to change in this code to accomplish this?
Would I be better off starting from scratch or does another script already exist that does what I want more effeciently?
I understand about half of what's going on in this script but simply don't know enough JS yet, besides time is in very short supply if you know what I mean, otherwise I wouldn't be asking.
TIA for your help, Jim
Code below:
<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>
FUNCTIONING EXAMPLES:
http://d3901543.u50.infinology.com/Index.htm
http://d3901543.u50.infinology.com/Newsletter1.htm
Popup HTM file:
http://d3901543.u50.infinology.com/CopyPopup.htm