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

  1. <!--  to hide script contents from old browsers
  2.  
  3. //the file that includes this must also include settings.js!
  4.  
  5. function loadData()
  6. {
  7.     var acctSetupFile        =    parent.parent.globals.getAcctSetupFilename(parent.parent.globals);
  8.     
  9.      var askSaveFlag         =     "";
  10.      var    savePasswords        =     "";
  11.      var asFormName            =    "onlaccoptions";
  12.  
  13.      modeSectionName            =    "Mode Selection";
  14.      newSectionName            =    "New Acct Mode";    
  15.      existingSectionName        =    "Existing Acct Mode";
  16.      
  17.     
  18.     //set the online/offline flags
  19.     askSaveFlag         = parent.parent.globals.GetNameValuePair(acctSetupFile,newSectionName,"AskSaveAcctInfo");
  20.     savePasswords        = parent.parent.globals.GetNameValuePair(acctSetupFile,newSectionName,"SavePasswords");
  21.     
  22.     if ((askSaveFlag != null) && (askSaveFlag != "") && (askSaveFlag == "no"))
  23.     {
  24.         setRadio(asFormName, "saveinfo", 2); 
  25.     }
  26.     else if ((savePasswords != null) && (savePasswords != "") && (savePasswords == "yes"))
  27.     {
  28.         setRadio(asFormName, "saveinfo", 0);
  29.     }
  30.     else
  31.     {
  32.         setRadio(asFormName, "saveinfo", 1);
  33.     }
  34.         
  35.     if (parent.controls.generateControls)    parent.controls.generateControls();
  36. }//function loadData()
  37.  
  38.  
  39. function checkData()
  40. {
  41.     return true;
  42. }
  43.  
  44.  
  45. function saveData()
  46. {
  47.     var acctSetupFile        =    parent.parent.globals.getAcctSetupFilename(parent.parent.globals);
  48.      var asFormName            =    "onlaccoptions";
  49.  
  50.      modeSectionName            =    "Mode Selection";
  51.      newSectionName            =    "New Acct Mode";
  52.      existingSectionName        =    "Existing Acct Mode";
  53.  
  54.     var saveRadio = getRadio(asFormName, "saveinfo");
  55.     var saveRadioString = new String(saveRadio);
  56.  
  57.     if (saveRadioString == "yes")
  58.     {
  59.      parent.parent.globals.SetNameValuePair(acctSetupFile, newSectionName, "AskSaveAcctInfo", "yes");
  60.      parent.parent.globals.SetNameValuePair(acctSetupFile, newSectionName, "SavePasswords", "yes");
  61.     }
  62.     else if ((!isNaN(parseInt(saveRadio))) && (saveRadio == 2))
  63.     {
  64.      parent.parent.globals.SetNameValuePair(acctSetupFile, newSectionName, "AskSaveAcctInfo", "no");
  65.      parent.parent.globals.SetNameValuePair(acctSetupFile, newSectionName, "SavePasswords", "no");    
  66.     }
  67.     else
  68.     {
  69.         //default - set saveInfo to yes, set savePasswords to no
  70.      parent.parent.globals.SetNameValuePair(acctSetupFile, newSectionName, "AskSaveAcctInfo", "yes");
  71.      parent.parent.globals.SetNameValuePair(acctSetupFile, newSectionName, "SavePasswords", "no");    
  72.     }
  73. }
  74.  
  75.  
  76.  //    For easy reference, this is the list of flags that ACCTSET.INI currently supports
  77.  //    ForceExisting
  78.  // ExistingSRFile
  79.  //    ForceNew
  80.  //    IntlMode
  81.  //    ShowNewPathInfo
  82.  //    AskSaveAcctInfo
  83.  //    SavePasswords
  84.  //    AskPersonalInfo
  85.  //    //AskSurvey        //defunct
  86.  //    //AskShareInfo    //defunct
  87.  //    AskBillingInfo
  88.  //    RegServer
  89.  //    CardTypes
  90.  //    ShowExistingPathInfo
  91.  //    RegPodURL
  92.  //    ShowIntro2
  93.  // ShowPhones
  94.  //    AskName
  95.  //    AskLogin
  96.  //    AskTTY
  97.  //    AskEmail
  98.  //    AskPhone
  99.  //    AskDNS
  100.  //    AskHosts
  101.  // AskPublishing
  102.  //    AskRegister
  103.  //    AskLDAP
  104.  //    AskIMAP
  105.  
  106.  
  107.  
  108. // end hiding contents from old browsers  -->
  109.