rem: renameButton = document.getElementById("renbutton"); 
add: var renameButton = document.getElementById("renbutton"); 
context: function RenameProfile(){  var lString, oldName, newName;  renameButton = document.getElementById("renbutton");  if (renameButton.getAttribute("disabled") == "true" )    return false;  var profileList = document.getElementById( "profiles" );  var selected = profileList.selectedItems[0];  var profilename = selected.getAttribute("profile_name");  if( selected.getAttribute("rowMigrate") == "no" ) {    // migrate if the user wants to    lString = gProfileManagerBundle.getString("migratebeforerename");    lString = lString.replace(/\s*<html:br\/>/g,"\n");    lString = lString.replace(/%brandShortName%/, gBrandBundle.getString("brandShortName"));    var title = gProfileManagerBundle.getString("migratetitle");    if (promptService.confirm(window, title, lString)) {      var profileDir = profile.getProfileDir(profilename);      if (profileDir) {        profileDir = profileDir.QueryInterface( Components.interfaces.nsIFile );        if (profileDir) {          if (!profileDir.exists()) {            var errorMessage = gProfileManagerBundle.getString("sourceProfileDirMissing");            var profileDirMissingTitle = gProfileManagerBundle.getString("sourceProfileDirMissingTitle");            promptService.alert(window, profileDirMissingTitle, errorMessage);              return false;                    }        }      }            profile.migrateProfile( profilename );    }    else      return false;  }  else {    oldName = selected.getAttribute("rowName");    newName = {value:oldName};    var dialogTitle = gProfileManagerBundle.getString("renameprofiletitle");    var msg = gProfileManagerBundle.getString("renameProfilePrompt");    msg = msg.replace(/%oldProfileName%/gi, oldName);    while (1) {      var rv = promptService.prompt(window, dialogTitle, msg, newName, null, {value:0});      if (rv) {        newName = newName.value;        if (!newName) return false;        var invalidChars = ["/", "\\", "*", ":"];        for( var i = 0; i < invalidChars.length; i++ )        {          if( newName.indexOf( invalidChars[i] ) != -1 ) {            var aString = gProfileManagerBundle.getString("invalidCharA");            var bString = gProfileManagerBundle.getString("invalidCharB");            bString = bString.replace(/\s*<html:br\/>/g,"\n");            lString = aString + invalidChars[i] + bString;            alert( lString );            return false;          }        }                var migrate = selected.getAttribute("rowMigrate");        try {          profile.renameProfile(oldName, newName);          selected.setAttribute( "label", newName );          selected.setAttribute( "rowName", newName );          selected.setAttribute( "profile_name", newName );        }        catch(e) {          lString = gProfileManagerBundle.getString("profileExists");          var profileExistsTitle = gProfileManagerBundle.getString("profileExistsTitle");          promptService.alert(window, profileExistsTitle, lString);          continue;        }      }      break;    }  }  // set the button state  DoEnabling();   return true; }
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/9b5f6e6053c9e7d48b93231d8f55955821c7c61d/profileManager.js/buggy/profile/resources/content/profileManager.js