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.

88 lines
1.8 KiB

  1. <%@ LANGUAGE = VBScript %>
  2. <% Option Explicit %>
  3. <!-- #include file="../directives.inc" -->
  4. <% ' Allow caching of this script %>
  5. <!--#include file="jsbrowser.str"-->
  6. var SLASH = "/"
  7. var DBLSLASH = "\\"
  8. //open
  9. var POP = true;
  10. //browser style
  11. var TDIR = 0
  12. var TFILE = 1
  13. //system font size
  14. var SMALL = 0
  15. var LARGE = 1
  16. function BrowserObj(pathCntrl,open,browsertype,sysfontsize)
  17. {
  18. this.browsertype = browsertype;
  19. this.sysfontsize = sysfontsize;
  20. this.currentFile = "";
  21. if (pathCntrl != null)
  22. {
  23. this.currentPath = pathCntrl.value;
  24. this.lastpath = pathCntrl.value;
  25. this.pathCntrl = pathCntrl;
  26. }
  27. else
  28. {
  29. this.currentPath = "";
  30. this.lastPath = "";
  31. }
  32. this.BrowserObjSetPath = BrowserObjSetPath;
  33. this.BrowserObjOpen = BrowserObjOpen;
  34. if (open)
  35. {
  36. BrowserObjOpen();
  37. }
  38. }
  39. function BrowserObjPop(title, width, height, filename)
  40. {
  41. thefile=(filename + ".asp");
  42. thefile="JSBrowser/JSBrwPop.asp?pg="+thefile;
  43. var browser = navigator.appName;
  44. popbox=window.open(thefile,title,"resizable=yes,toolbar=no,scrollbars=yes,directories=no,menubar=no,width="+width+",height="+height);
  45. popbox.opener = self;
  46. }
  47. function BrowserObjOpen()
  48. {
  49. BrowserObjPop('Browser',<%= L_JSBROWSER_W %>,<%= L_JSBROWSER_H %>,'JSBrowser');
  50. }
  51. function BrowserObjSetPath()
  52. {
  53. if (JSBrowser.browsertype == TDIR)
  54. {
  55. JSBrowser.pathCntrl.value = JSBrowser.currentPath;
  56. }
  57. else
  58. {
  59. currentPath = JSBrowser.currentPath;
  60. if (currentPath.lastIndexOf(DBLSLASH) == currentPath.length-1)
  61. {
  62. JSBrowser.pathCntrl.value = currentPath + JSBrowser.currentFile;
  63. }
  64. else
  65. {
  66. JSBrowser.pathCntrl.value = currentPath + DBLSLASH + JSBrowser.currentFile;
  67. }
  68. }
  69. JSBrowser.pathCntrl.focus();
  70. JSBrowser.pathCntrl.blur();
  71. }