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.

46 lines
850 B

  1. //
  2. // Copyright (c) 2000 Microsoft Corporation
  3. //
  4. var L_Dialog_ErrorMessage = "An error has occurred in this dialog.";
  5. var L_ErrorNumber_Text = "Error: ";
  6. //////////////////////////////////////////////////////////////////////
  7. function txtDefaultESC()
  8. {
  9. if(event.keyCode == 27)
  10. {
  11. event.cancelBubble = true;
  12. event.returnValue = false;
  13. global_Cancel();
  14. return;
  15. }
  16. }
  17. function fnHandleError( message, url, line )
  18. {
  19. var str = L_Dialog_ErrorMessage + "\n\n" + L_ErrorNumber_Text + line + "\n" + message;
  20. try
  21. {
  22. pchealth.MessageBox( str, "OK" );
  23. }
  24. catch(e)
  25. {
  26. alert(str);
  27. }
  28. window.close();
  29. return true;
  30. }
  31. function fnInitCommon()
  32. {
  33. window.onerror = fnHandleError;
  34. window.onkeyup = txtDefaultESC;
  35. window.onkeydown = txtDefaultESC;
  36. window.onunload = global_Shutdown;
  37. }