Source code of Windows XP (NT5)
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.

286 lines
7.1 KiB

  1. <HTML id=dlgError STYLE="font-family: ms sans serif; font-size: 8pt;
  2. width: 42em; height: 27em">
  3. <HEAD>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  5. <META HTTP-EQUIV="MSThemeCompatible" CONTENT="Yes">
  6. <TITLE id=dialogTitle>
  7. Internet Explorer Script Error
  8. </TITLE>
  9. <SCRIPT LANGUAGE="JavaScript" defer>
  10. window.onerror = HandleError
  11. //+-------------------------------------------------------------------
  12. //
  13. // Synopsis: Turns off error messages in dialogs
  14. //
  15. // Arguments: none
  16. //
  17. // returns: true (tells browser not to handle message)
  18. //
  19. //--------------------------------------------------------------------
  20. function HandleError(message, url, line)
  21. {
  22. var L_Dialog_ErrorMessage = "An error has occurred in this dialog.";
  23. var L_ErrorNumber_Text = "Error: ";
  24. var str = L_Dialog_ErrorMessage + "\n\n"
  25. + L_ErrorNumber_Text + line + "\n"
  26. + message;
  27. alert (str);
  28. window.close();
  29. return true;
  30. }
  31. //+----------------------------------------------------------------------
  32. //
  33. // Synopsis: Binds events to controls, determines if the script
  34. // debugger is loaded and formats the dialog appropriately
  35. //
  36. // Arguments: none.
  37. //
  38. // Returns: nothing.
  39. //
  40. //-----------------------------------------------------------------------
  41. function loadBdy()
  42. {
  43. var L_ContinueScript_Message = "Do you want to debug the current page?";
  44. var objOptions = window.dialogArguments; // Options holder
  45. //
  46. // Bind event to controls
  47. //
  48. btnNo.onclick = new Function("btnOKClick()");
  49. btnNo.onkeydown = new Function("SwitchFocus()");
  50. btnYes.onclick = new Function("btnYesClick()");
  51. btnYes.onkeydown = new Function("SwitchFocus()");
  52. document.onkeypress = new Function("docKeypress()");
  53. //
  54. // Fill the dialog with error information
  55. //
  56. spnLine.innerText = objOptions.errorLine;
  57. spnCharacter.innerText = objOptions.errorCharacter;
  58. spnError.innerText = objOptions.errorMessage;
  59. spnCode.innerText = objOptions.errorCode;
  60. txaURL.innerText = objOptions.errorUrl;
  61. //
  62. // If the script debugger is installed, display the text and
  63. // yes/no buttons
  64. //
  65. if (objOptions.errorDebug)
  66. {
  67. divDebug.innerText = L_ContinueScript_Message;
  68. }
  69. btnYes.focus();
  70. } // loadBdy
  71. //+-----------------------------------------------------------------------
  72. //
  73. // Sysopsis: If an arrow key is pressed, switch focus to the other
  74. // button
  75. //
  76. // Arguments: none
  77. //
  78. // Returns: nothing
  79. //
  80. //------------------------------------------------------------------------
  81. function SwitchFocus()
  82. {
  83. var HTML_KEY_ARROWLEFT = 37;
  84. var HTML_KEY_ARROWDOWN = 40;
  85. var iCode = event.keyCode;
  86. var strSourceID = event.srcElement.id;
  87. if (iCode < HTML_KEY_ARROWLEFT || iCode > HTML_KEY_ARROWDOWN)
  88. return;
  89. if (strSourceID == "btnYes")
  90. {
  91. btnNo.focus();
  92. }
  93. else
  94. {
  95. btnYes.focus();
  96. }
  97. } // SwitchFocus
  98. //+-------------------------------------------------------------------
  99. //
  100. // Synopsis: Closes the dialog doing nothing.
  101. //
  102. // Arguments: none
  103. //
  104. // Returns: nothing
  105. //
  106. //---------------------------------------------------------------------
  107. function btnOKClick()
  108. {
  109. window.close();
  110. } // btnOKClick
  111. //+-------------------------------------------------------------------
  112. //
  113. // Synopsis: Closes the dialog and launches the script debugger
  114. //
  115. // Arguments: none
  116. //
  117. // Returns: nothing
  118. //
  119. //--------------------------------------------------------------------
  120. function btnYesClick()
  121. {
  122. //
  123. // Setting returnValue = true will launch the script debugger when
  124. // the dialog is dismissed.
  125. //
  126. window.returnValue = true;
  127. window.close();
  128. } // btnYesClick
  129. //+--------------------------------------------------------------------
  130. //
  131. // Synopsis: Checks to see if Y or N key (or other keys if
  132. // localized) has been pressed.
  133. //
  134. // Arguments: none
  135. //
  136. // Returns: nothing
  137. //
  138. //---------------------------------------------------------------------
  139. function docKeypress()
  140. {
  141. var L_AffirmativeKeyCodeLowerCase_Number = 121;
  142. var L_AffirmativeKeyCodeUpperCase_Number = 89;
  143. var L_NegativeKeyCodeLowerCase_Number = 110;
  144. var L_NegativeKeyCodeUpperCase_Number = 78;
  145. var intKeyCode = window.event.keyCode;
  146. if (intKeyCode == L_AffirmativeKeyCodeLowerCase_Number
  147. || intKeyCode == L_AffirmativeKeyCodeUpperCase_Number)
  148. {
  149. btnYesClick();
  150. }
  151. if (intKeyCode == L_NegativeKeyCodeLowerCase_Number
  152. || intKeyCode == L_NegativeKeyCodeUpperCase_Number)
  153. {
  154. btnOKClick();
  155. }
  156. } // docKeypress
  157. </SCRIPT>
  158. </HEAD>
  159. <BODY ID=bdy onLoad="loadBdy()" style="font-family: 'ms sans serif';
  160. font-size: 8pt; background: threedface; color: windowtext;" topmargin=0>
  161. <CENTER id=ctrErrorMessage>
  162. <table id=tbl1 cellPadding=3 cellspacing=3 border=0
  163. style="background: buttonface; font-family: ms sans serif; font-size: 8pt;">
  164. <TR>
  165. <TD id=tdImage>
  166. <img id=imgWarning src=warning.gif width=36 height=38 border=0 align=middle>
  167. </TD>
  168. <TD id=tdErrorMessage>
  169. An error has occurred in the script on this page.
  170. </TD>
  171. </TR>
  172. </TABLE>
  173. </CENTER>
  174. <DIV id=divTop style="background: threedface; font-family: ms sans serif;
  175. font-size: 8pt; margin-left: 1.5em">
  176. <TABLE border=0 id=tbl2
  177. style="background: buttonface; font-family: ms sans serif; font-size: 8pt;
  178. margin-left: 1em;">
  179. <TBODY>
  180. <TR valign=top>
  181. <TD id=tdLine nowrap>
  182. Line:&nbsp;&nbsp;&nbsp;&nbsp;
  183. </TD>
  184. <TD id=tdSpanLine>
  185. <SPAN id=spnLine></SPAN>
  186. </TD>
  187. </TR>
  188. <TR valign=top>
  189. <TD id=tdChar nowrap>
  190. Char:&nbsp;&nbsp;&nbsp;&nbsp;
  191. </TD>
  192. <TD id=tdSpanCharacter>
  193. <SPAN id=spnCharacter></SPAN>
  194. </TD>
  195. </TR>
  196. <TR valign=top>
  197. <TD id=tdError nowrap>
  198. Error:&nbsp;&nbsp;&nbsp;&nbsp;
  199. </TD>
  200. <TD id=tdSpanError>
  201. <DIV id=spnError style="background: threedface;
  202. font-family: ms sans serif; font-size: 8pt; width: 31em;"></DIV>
  203. </TD>
  204. </TR>
  205. <TR valign=top>
  206. <TD id=tdCode nowrap>
  207. Code:&nbsp;&nbsp;&nbsp;&nbsp;
  208. </TD>
  209. <TD id=tdSpanCode>
  210. <SPAN id=spnCode></SPAN>
  211. </TD>
  212. </TR>
  213. <TR valign=top>
  214. <TD id=tdURL nowrap>
  215. URL:&nbsp;&nbsp;&nbsp;&nbsp;
  216. </TD>
  217. <TD id=tdSpanURL>
  218. <TEXTAREA id=txaURL style="font-family: MS Shell Dlg; font-size: 8pt;
  219. background: buttonface; overflow: hidden; width: 28em; height: 3.9em;
  220. border: 0px;" readonly wrap=physical tabindex=-1>
  221. </TEXTAREA>
  222. </TD>
  223. </TR>
  224. </TBODY>
  225. </TABLE>
  226. </DIV>
  227. <DIV id=divDebug style="background: threedface; position: absolute;
  228. font-family: ms sans serif; font-size: 8pt; top: 17em;
  229. text-align: center; width=100%;">
  230. Do you want to continue running scripts on this page?
  231. </DIV>
  232. <DIV id=divButttons style="background: buttonface; position: absolute;
  233. font-family: ms sans serif; font-size: 8pt; top: 20em; width: 100%">
  234. <CENTER id=ctrButtons>
  235. <BUTTON ID=btnYes style="font-family: ms sans serif; font-size: 8pt;
  236. width: 3.8em; height: 2.2em;" type=submit accesskey=y>
  237. <U id=undYes>Y</U>es
  238. </BUTTON>
  239. <BUTTON ID=btnNo style="font-family: ms sans serif; font-size: 8pt;
  240. width: 3.8em; height: 2.2em" type=reset accesskey=n>
  241. <U id=undNo>N</U>o
  242. </BUTTON>
  243. </CENTER>
  244. </DIV>
  245. </BODY>
  246. </HTML>