Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

139 lines
2.4 KiB

  1. <PUBLIC:ATTACH EVENT="oncontextmenu" ONEVENT="fnNoMenu();" />
  2. <PUBLIC:ATTACH EVENT="onkeydown" ONEVENT="fnOnKeyDown();" />
  3. <PUBLIC:ATTACH EVENT="onkeypress" ONEVENT="fnOnKeyPress();" />
  4. <PUBLIC:ATTACH EVENT="onselectstart" ONEVENT="fnOnSelectStart();" />
  5. <PUBLIC:ATTACH EVENT="onhelp" ONEVENT="fnOnHelp();" />
  6. <PUBLIC:ATTACH EVENT="ondragstart" ONEVENT="fnOnDragStart();" />
  7. <PUBLIC:ATTACH EVENT="ondrag" ONEVENT="fnOnDrag();" />
  8. <PUBLIC:ATTACH EVENT="ondragend" ONEVENT="fnOnDragEnd();" />
  9. <SCRIPT LANGUAGE="JScript">
  10. var VK_F5 = 0x74;
  11. var VK_BACK = 0x08;
  12. var VK_N = 0x4E;
  13. var VK_ESC = 0x1B;
  14. var VK_ENTER = 0x0D;
  15. function IsInputField()
  16. {
  17. switch( event.srcElement.tagName )
  18. {
  19. case "INPUT":
  20. case "SELECT":
  21. case "TEXTAREA":
  22. return true;
  23. }
  24. return false;
  25. }
  26. function fnNoMenu()
  27. {
  28. //
  29. // For debugging uncomment this line
  30. //
  31. // if(event.ctrlKey) return true;
  32. if(IsInputField() == false)
  33. {
  34. event.cancelBubble = true;
  35. event.returnValue = false;
  36. return false;
  37. }
  38. return true ;
  39. }
  40. function fnOnKeyDown()
  41. {
  42. switch ( event.keyCode )
  43. {
  44. case VK_F5 : // Disable refresh!
  45. {
  46. event.cancelBubble = true;
  47. event.returnValue = false;
  48. return false;
  49. }
  50. case VK_N :
  51. {
  52. if( event.ctrlKey == true )
  53. {
  54. event.cancelBubble = true;
  55. event.returnValue = false;
  56. return false;
  57. }
  58. break;
  59. }
  60. case VK_BACK : // Disable back space
  61. {
  62. if( IsInputField() == false )
  63. {
  64. event.cancelBubble = true;
  65. event.returnValue = false;
  66. return false;
  67. }
  68. break;
  69. }
  70. }
  71. return true;
  72. }
  73. function fnOnKeyPress()
  74. {
  75. return true;
  76. }
  77. function fnOnSelectStart()
  78. {
  79. window.event.returnValue = false
  80. window.event.cancelBubble = true
  81. return false ;
  82. }
  83. function fnOnHelp()
  84. {
  85. OnLink_HelpF1();
  86. }
  87. function fnOnDragStart()
  88. {
  89. event.cancelBubble = true;
  90. event.returnValue = false;
  91. return false;
  92. }
  93. function fnOnDrag()
  94. {
  95. event.cancelBubble = true;
  96. event.returnValue = false;
  97. return false;
  98. }
  99. function fnOnDragEnd()
  100. {
  101. event.cancelBubble = true;
  102. event.returnValue = false;
  103. return false;
  104. }
  105. </SCRIPT>