User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 397,625 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,495 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting

Runtime Error Help PLEASE

Join Date: Jun 2005
Location: Kansas City, Missouri, USA
Posts: 344
Reputation: Troy is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 4
Troy's Avatar
Troy Troy is offline Offline
Posting Whiz

Re: Runtime Error Help PLEASE

  #2  
Mar 17th, 2006
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 Wolf is the author of SnippetEdit. "Website editing as easy as it gets." IX Web Hosting
Reply With Quote  
All times are GMT -4. The time now is 8:59 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC