home *** CD-ROM | disk | FTP | other *** search
/ Software Selections: IBM PC 300GL / TWCUSN017WW.iso / content / cdimage.js next >
Encoding:
Text File  |  1999-06-21  |  1.1 KB  |  57 lines

  1. function Body_OnLoad()
  2. {
  3.     SSWorld = GetControl("LeftPane", "SSWorld");
  4.  
  5.     if (SSWorld != null)
  6.     {
  7.         CDImagePath.value     = SSWorld.CreateImagePath;
  8.         CDImageSize.innerText = SSWorld.GetCDImageSize();
  9.  
  10.         if (CDImageSize.innerText != -1)
  11.             CDImageSizeSection.style.display = "";
  12.  
  13.         CDImagePath.disabled  = false;
  14.         BrowseButton.Enabled  = true;
  15.         VerifyCDImagePath()
  16.     }
  17. }
  18.  
  19. function CDImagePath_OnKeyUp()
  20. {
  21.     setTimeout('VerifyCDImagePath()', 1)
  22. }
  23.  
  24. function VerifyCDImagePath()
  25. {
  26.     var strPath = CDImagePath.value;
  27.     var bBlank  = true;
  28.  
  29.     for (i = 0; bBlank && i < strPath.length; ++i)
  30.         if (strPath.charAt(i) != ' ')
  31.             bBlank = false;
  32.     
  33.     CreateButton.Enabled = !bBlank;
  34. }
  35.  
  36. function CreateButton_Click()
  37. {
  38.     SSWorld = GetControl("LeftPane", "SSWorld");
  39.  
  40.     if (SSWorld != null)
  41.         SSWorld.CreateImage(CDImagePath.value);
  42. }
  43.  
  44. function BrowseButton_Click()
  45. {
  46.     SSWorld = GetControl("LeftPane", "SSWorld");
  47.  
  48.     if (SSWorld != null)
  49.         CDImagePath.value = SSWorld.BrowseForCreateImage();
  50.  
  51.      VerifyCDImagePath();
  52. }
  53.  
  54. function ExitButton_Click()
  55. {
  56.     Exit();
  57. }