954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Runtime Error Help PLEASE

csnewsome
Newbie Poster
Banned
9 posts since Feb 2005
Reputation Points: 10
Solved Threads: 0
 

I fixed all the obvious problems I found (there were several).

var message="Function Disabled!";

function clickIE()
{
	if (document.all) {
		alert(message);
		return false;
	}
}

function clickNS(e)
{
	if (document.layers||(document.getElementById&&!document.all)) {
		if (e.which==1||e.which==2||e.which==3) {
			alert(message);
			return false;
		}
	}
}

if (document.layers) {
	document.captureEvents(Event.MOUSEDOWN);
	document.onmousedown=clickNS;
} else {
	document.onmouseup=clickNS;
	document.oncontextmenu=clickIE;
}

document.oncontextmenu=new Function("return false;");

function disableselect(e)
{
	return false;
}

function reEnable()
{
	return true;
}

document.onselectstart=new Function ("return false;");

if (window.sidebar){
	document.onmousedown=disableselect;
	document.onclick=reEnable;
}
Troy
Posting Whiz
362 posts since Jun 2005
Reputation Points: 36
Solved Threads: 6
 

Thanks Troy! I tested it locally, where it worked GREAT, and have passed it along. Many thanks for your help.

csnewsome
Newbie Poster
Banned
9 posts since Feb 2005
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You