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 374,019 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,757 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
Views: 2011 | Replies: 2
Reply
Join Date: Feb 2005
Location: Corpus Christi, TX
Posts: 9
Reputation: csnewsome is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
csnewsome's Avatar
csnewsome csnewsome is offline Offline
Newbie Poster

Help Runtime Error Help PLEASE

  #1  
Mar 16th, 2006
A former instructor (process technology) has emailed me with a question concerning a runtime error he is receiving. I am not a programmer and provided him with code snippets for his WebCT environment.
He has emailed me and asked a question I cannot answer. He is receiving a runtime error for the following snippet that a ";" is missing. Can someone tell me where that semi-colon is supposed to go?
Thanks, Steve
snewsome@stx.rr.com

<HEAD>

<META HTTP-EQUIV="imagetoolbar" CONTENT="no">

</HEAD>



<STYLE media="print">BODY {display:none}</STYLE>



<BODY ondragstart="return false" onselectstart="return false">

<script language="JavaScript">

var message="Function Disabled!";

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

function clickNS(e) {if

(document.layers||(document.getElementById&&!document.all)) { if

(e.which==1||e.which==2||e.which==3) {(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

}

</script>



<!-- ///////////////////////////////////////// //-->

<html><head>

<script language="JavaScript"><!--

function clp_clear() {

var content=window.clipboardData.getData("Text");

if (content==null) {

window.clipboardData.clearData();}

setTimeout("clp_clear();",1000);}

--></script></head>

<body onload='clp_clear()'>

</body></html>
AddThis Social Bookmark Button
Reply With Quote  
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  
Join Date: Feb 2005
Location: Corpus Christi, TX
Posts: 9
Reputation: csnewsome is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
csnewsome's Avatar
csnewsome csnewsome is offline Offline
Newbie Poster

Re: Runtime Error Help PLEASE

  #3  
Mar 17th, 2006
Thanks Troy! I tested it locally, where it worked GREAT, and have passed it along. Many thanks for your help.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JavaScript / DHTML / AJAX Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 11:11 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC