rem: switch(autocomplete.selectedItem.value) 
add: switch(autocomplete.value) 
context: function onSave(){  var override = document.getElementById("identity.overrideGlobalPref");  var autocomplete = document.getElementById("ldapAutocomplete");  var directoryServer = document.getElementById("identity.directoryServer");  var directoriesList =       document.getElementById("directoriesList").getAttribute('value');    // When switching between panes,   // if we save the value of an element as null  // we will be forced to get the value from preferences when we get back.  // We are saving the value as "" for the radio button and also for  // the directory server if the selected directory is "None"  // So, we need the two elements overrideGlobalPref and directoryServer  // to save the state when the directory is   // set to none and the first radio button is selected.  switch(autocomplete.selectedItem.value)  {    case "0":      override.setAttribute('value', "");      document.getElementById("overrideGlobalPref").setAttribute("value", "0");      document.getElementById("directoryServer").setAttribute("value", "");      break;    case "1":      override.setAttribute('value', true);      directoryServer.setAttribute("value", directoriesList);      document.getElementById("overrideGlobalPref").setAttribute("value", "");      if(directoriesList == "")        document.getElementById("directoryServer").setAttribute("value", "none");      else        document.getElementById("directoryServer").setAttribute("value", "");      break;  } }
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/a870550df480d6138a90786d539dd3a584cda901/am-addressing.js/clean/mailnews/base/prefs/resources/content/am-addressing.js