rem: document.getElementById("basedn").value = gLdapService.UTF8toUCS2(ldapUrl.dn); document.getElementById("search").value = gLdapService.UTF8toUCS2(ldapUrl.filter); 
add: document.getElementById("basedn").value = ldapUrl.dn; document.getElementById("search").value = ldapUrl.filter; 
context: function fillSettings(){  gPrefInt = Components.classes["@mozilla.org/preferences-service;1"]    .getService(Components.interfaces.nsIPrefBranch);  var ldapUrl = Components.classes["@mozilla.org/network/ldap-url;1"];  ldapUrl = ldapUrl.createInstance().    QueryInterface(Components.interfaces.nsILDAPURL);  try {    var prefValue =       gPrefInt.getComplexValue(gCurrentDirectoryString + ".description",                               Components.interfaces.nsISupportsString).data;  } catch(ex) {    prefValue="";  }    document.getElementById("description").value = prefValue;  ldapUrl.spec = gPrefInt.getComplexValue(gCurrentDirectoryString +".uri",                                          Components.interfaces.                                          nsISupportsString).data;  document.getElementById("hostname").value = ldapUrl.host;  document.getElementById("port").value = ldapUrl.port;  document.getElementById("basedn").value =     gLdapService.UTF8toUCS2(ldapUrl.dn);  document.getElementById("search").value =     gLdapService.UTF8toUCS2(ldapUrl.filter);  var sub = document.getElementById("sub");  switch(ldapUrl.scope) {  case Components.interfaces.nsILDAPURL.SCOPE_ONELEVEL:    sub.radioGroup.selectedItem = document.getElementById("one");    break;  default:    sub.radioGroup.selectedItem = sub;    break;  }      if (ldapUrl.options & ldapUrl.OPT_SECURE) {    document.getElementById("secure").setAttribute("checked", "true");  }  try {    prefValue = gPrefInt.getIntPref(gCurrentDirectoryString + ".maxHits");  } catch(ex) {    prefValue = kDefaultMaxHits;  }  document.getElementById("results").value = prefValue;  try {    prefValue =       gPrefInt.getComplexValue(gCurrentDirectoryString + ".auth.dn",                               Components.interfaces.nsISupportsString).data;  } catch(ex) {    prefValue="";  }  document.getElementById("login").value = prefValue;  // check if any of the preferences for this server are locked.  //If they are locked disable them  DisableUriFields(gCurrentDirectoryString + ".uri");  DisableElementIfPrefIsLocked(gCurrentDirectoryString + ".description", "description");  DisableElementIfPrefIsLocked(gCurrentDirectoryString + ".disable_button_download", "download");  DisableElementIfPrefIsLocked(gCurrentDirectoryString + ".maxHits", "results");  DisableElementIfPrefIsLocked(gCurrentDirectoryString + ".auth.dn", "login");}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/4422be93b3a8f2a3cafe69ad27720dabe93ab4d4/pref-directory-add.js/clean/mailnews/addrbook/prefs/resources/content/pref-directory-add.js