943,959 Members | Top Members by Rank

Ad:
Mar 16th, 2006
0

Runtime Error Help PLEASE

Expand Post »
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>
Similar Threads
Reputation Points: 10
Solved Threads: 0
Banned
csnewsome is offline Offline
9 posts
since Feb 2005
Mar 17th, 2006
0

Re: Runtime Error Help PLEASE

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

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. var message="Function Disabled!";
  2.  
  3. function clickIE()
  4. {
  5. if (document.all) {
  6. alert(message);
  7. return false;
  8. }
  9. }
  10.  
  11. function clickNS(e)
  12. {
  13. if (document.layers||(document.getElementById&&!document.all)) {
  14. if (e.which==1||e.which==2||e.which==3) {
  15. alert(message);
  16. return false;
  17. }
  18. }
  19. }
  20.  
  21. if (document.layers) {
  22. document.captureEvents(Event.MOUSEDOWN);
  23. document.onmousedown=clickNS;
  24. } else {
  25. document.onmouseup=clickNS;
  26. document.oncontextmenu=clickIE;
  27. }
  28.  
  29. document.oncontextmenu=new Function("return false;");
  30.  
  31. function disableselect(e)
  32. {
  33. return false;
  34. }
  35.  
  36. function reEnable()
  37. {
  38. return true;
  39. }
  40.  
  41. document.onselectstart=new Function ("return false;");
  42.  
  43. if (window.sidebar){
  44. document.onmousedown=disableselect;
  45. document.onclick=reEnable;
  46. }
Reputation Points: 36
Solved Threads: 6
Posting Whiz
Troy is offline Offline
354 posts
since Jun 2005
Mar 17th, 2006
0

Re: Runtime Error Help PLEASE

Thanks Troy! I tested it locally, where it worked GREAT, and have passed it along. Many thanks for your help.
Reputation Points: 10
Solved Threads: 0
Banned
csnewsome is offline Offline
9 posts
since Feb 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: Please help!! i am so desperate!
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: Creative element selection with JavaScript





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC