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.

121 lines
4.4 KiB

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
  2. <html>
  3. <head>
  4. <style>
  5. a:link {font:8pt/11pt verdana; color:red}
  6. a:visited {font:8pt/11pt verdana; color:#4e4e4e}
  7. </style>
  8. <meta HTTP-EQUIV="Content-Type" Content="text-html; charset=Windows-1252">
  9. <title>HTTP 405 - Resource not allowed</title>
  10. </head>
  11. <script>
  12. function Related(){
  13. userURL=document.location.href;
  14. //for the href, we need a valid URL to the domain. We search for the # symbol to find the begining
  15. //of the true URL, and add 1 to skip it - this is the BeginURL value. We use serverIndex as the end marker.
  16. BeginURL=userURL.indexOf("#",1) + 1;
  17. CurrentURL=userURL.substring(BeginURL,DocURL.length);
  18. //Build the query
  19. RelatedServiceURL="http://related.msn.com/related.asp?url=";
  20. //Perform simple check for Intranet URLs
  21. //this is where the http or https will be, as found by searching for :// but skip res:
  22. protocolIndex=userURL.indexOf("://",4);
  23. serverIndex=userURL.indexOf("/",protocolIndex + 3);
  24. urlresult=userURL.substring(0,serverIndex);
  25. if (protocolIndex - BeginURL > 7)
  26. urlresult=""
  27. //Check if Intranet URL - then open search bar
  28. if (urlresult.indexOf(".",0) < 1) userURL="Intranet URL";
  29. finalURL = RelatedServiceURL + encodeURIComponent(userURL);
  30. window.open(finalURL, "_search");
  31. }
  32. function Homepage(){
  33. // in real bits, urls get returned to our script like this:
  34. // res://shdocvw.dll/http_404.htm#http://www.DocURL.com/bar.htm
  35. //For testing use DocURL = "res://shdocvw.dll/http_404.htm#https://www.microsoft.com/bar.htm"
  36. DocURL=document.location.href;
  37. //this is where the http or https will be, as found by searching for :// but skipping the res://
  38. protocolIndex=DocURL.indexOf("://",4);
  39. //this finds the ending slash for the domain server
  40. serverIndex=DocURL.indexOf("/",protocolIndex + 3);
  41. //for the href, we need a valid URL to the domain. We search for the # symbol to find the begining
  42. //of the true URL, and add 1 to skip it - this is the BeginURL value. We use serverIndex as the end marker.
  43. //urlresult=DocURL.substring(protocolIndex - 4,serverIndex);
  44. BeginURL=DocURL.indexOf("#",1) + 1;
  45. urlresult=DocURL.substring(BeginURL,serverIndex);
  46. //for display, we need to skip after http://, and go to the next slash
  47. displayresult=DocURL.substring(protocolIndex + 3 ,serverIndex);
  48. // Security precaution: must filter out "urlResult" and "displayresult"
  49. forbiddenChars = new RegExp("[<>\'\"]", "g"); // Global search/replace
  50. urlresult = urlresult.replace(forbiddenChars, "");
  51. displayresult = displayresult.replace(forbiddenChars, "");
  52. document.write('<A target=_top HREF="' + urlresult + '">' + displayresult + "</a>");
  53. }
  54. function doSearch()
  55. {
  56. saOC.NavigateToDefaultSearch();
  57. }
  58. function initPage()
  59. {
  60. document.body.insertAdjacentHTML("afterBegin","<object id=saOC CLASSID='clsid:B45FF030-4447-11D2-85DE-00C04FA35C89' HEIGHT=0 width=0></object>");
  61. }
  62. </script>
  63. <body bgcolor="white" onload="initPage()">
  64. <table width="400" cellpadding="3" cellspacing="5">
  65. <tr>
  66. <td id="tableProps" valign="top" align="left"><img id="pagerrorImg" SRC="pagerror.gif"
  67. width="25" height="33"></td>
  68. <td id="tablePropsWidth" align="left" valign="middle" width="360"><h1 id="errortype"
  69. style="COLOR: black; FONT: 13pt/15pt verdana"><span id="errorText">The page cannot be displayed</span></h1>
  70. </td>
  71. </tr>
  72. <tr>
  73. <td id="tablePropsWidth2" width="400" colspan="2"><font
  74. style="COLOR: black; FONT: 8pt/11pt verdana">The page you are looking for cannot be
  75. displayed because the address is incorrect.</font> </td>
  76. </tr>
  77. <tr>
  78. <td id="tablePropsWidth3" width="400" colspan="2"><font id="LID1"
  79. style="COLOR: black; FONT: 8pt/11pt verdana"><hr color="#C0C0C0" noshade>
  80. <p id="LID2">Please try the following:</p><ul>
  81. <li id="instructionsText1">If you typed the page address in the Address bar, check that it
  82. is entered correctly.<br>
  83. </li>
  84. <li id="instructionsText2">Open the <script> Homepage();</script> home page and then look for links
  85. to the information you want. </li>
  86. <li ID="instructionsText3">Click <a href="javascript:doSearch()"><img border=0 src="search.gif" width="16" height="16" alt="search.gif (114 bytes)" align="center"> Search</a> to look for information on the Internet. </li>
  87. </ul>
  88. <p><br>
  89. </p>
  90. <h2 ID="errortext2" style="COLOR: black; FONT: 8pt/11pt verdana">HTTP 405 - Resource not
  91. allowed<br>
  92. Internet Explorer </h2>
  93. </font></td>
  94. </tr>
  95. </table>
  96. </body>
  97. </html>