rem: var attrVal=overrideGlobalPref.getAttribute("disabled"); document.getElementById("ldapAutocomplete").disabled=attrVal; 
context: function enabling(){  var autocomplete = document.getElementById("ldapAutocomplete");  var directoriesList =  document.getElementById("directoriesList");   var directoriesListPopup = document.getElementById("directoriesListPopup");  var editButton = document.getElementById("editButton");  // this is the hidden text element that assigned a value from the prefs  var overrideGlobalPref = document.getElementById("identity.overrideGlobalPref");  switch(autocomplete.selectedItem.value)  {    case "0":      directoriesList.setAttribute("disabled", true);      directoriesListPopup.setAttribute("disabled", true);      editButton.setAttribute("disabled", true);      break;    case "1":        directoriesList.removeAttribute("disabled");        directoriesListPopup.removeAttribute("disabled");        editButton.removeAttribute("disabled");      break;        }  var attrVal=overrideGlobalPref.getAttribute("disabled");  document.getElementById("ldapAutocomplete").disabled=attrVal;  // if the pref is locked, we'll need to disable the elements  if (overrideGlobalPref.getAttribute("disabled") == "true") {    directoriesList.setAttribute("disabled", true);    directoriesListPopup.setAttribute("disabled", true);    editButton.setAttribute("disabled", true);  }  gFromGlobalPref = false;  LoadDirectories(directoriesListPopup);}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/14b2a8a92abc2e002da277ae9533dec68be17520/am-addressing.js/buggy/mailnews/base/prefs/resources/content/am-addressing.js