home *** CD-ROM | disk | FTP | other *** search
/ Online Praxis 1998 March / Image.iso / CD-ROM / NETSCAPE / CCK / ASE.Z / iasnmtab.js < prev    next >
Encoding:
Text File  |  1997-08-21  |  1.6 KB  |  64 lines

  1. <!--  to hide script contents from old browsers
  2.  
  3. //the file that includes this must also include gettings.js and nciglob.js
  4. var loaded = false;
  5.  
  6. function loadData()
  7. {
  8.     if (parent.parent.iasglobals && parent.parent.iasglobals.getGlobal)
  9.     {
  10.         var FormName = "IASCONFIGNAME";
  11.     
  12.         parent.parent.iasglobals.setText(FormName, "configName", parent.parent.iasglobals.getGlobal("SiteName"));            
  13.  
  14.         this.focus();
  15.         document.forms[0]["configName"].focus();
  16.         loaded = true;
  17.     }
  18.     else
  19.         setTimeout("loadData()",500);
  20. }//function loadData()
  21.  
  22.  
  23. function checkData()
  24. {
  25.     var valid = true;
  26.     
  27.     if (loaded && loaded == true)
  28.     {
  29.         if (parent.parent.iasglobals.iasDirty(null))
  30.         {
  31.             var FormName = "IASCONFIGNAME";
  32.         
  33.             var theName = parent.parent.iasglobals.getText(FormName, "configName");
  34.             if (theName == null || theName == "" || theName == "null")
  35.             {
  36.                 var override = !(confirm("Please Enter a Configuration Name before Continuing, or choose cancel to ignore changes."));
  37.                 document.forms[FormName]["configName"].focus();
  38.                 document.forms[FormName]["configName"].select();
  39.                 valid = override;
  40.             }
  41.         
  42.         }
  43.     
  44.         if (override)
  45.             parent.parent.iasglobals.iasDirty(false);
  46.  
  47.     }
  48.     return valid;
  49. }
  50.  
  51.  
  52. function saveData()
  53. {
  54.     if (loaded && loaded == true)
  55.     {
  56.         var FormName = "IASCONFIGNAME";
  57.     
  58.         parent.parent.iasglobals.setGlobal("SiteName", parent.parent.iasglobals.getText(FormName, "configName"));
  59.         parent.parent.iasglobals.setGlobal("Description", parent.parent.iasglobals.getText(FormName, "configName"));
  60.     }
  61. }
  62.  
  63. // end hiding contents from old browsers  -->
  64.