bug 79551, r=nhotta, sr=alecf

This commit is contained in:
loadrunner%betak.net 2001-05-12 03:55:46 +00:00
parent 1f94226bce
commit 0b70dc0cc7
2 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@ function Startup()
var selectedLanguage = window.arguments.length ? window.arguments[0] : null;
var tree = document.getElementById("langList");
if (selectedLanguage) {
var elements = tree.getElementsByAttribute("data", selectedLanguage);
var elements = tree.getElementsByAttribute("value", selectedLanguage);
if (elements.length)
tree.selectItem(elements[0].parentNode.parentNode);
}
@ -19,7 +19,7 @@ function onOK()
var tree = document.getElementById("langList");
var selectedItem = tree.selectedItems.length ? tree.selectedItems[0] : null;
if (selectedItem) {
var langName = selectedItem.firstChild.firstChild.getAttribute("data");
var langName = selectedItem.firstChild.firstChild.getAttribute("value");
var langStore = opener.document.getElementById("ProfileLocale");
if (langStore)
langStore.setAttribute("data", langName);

View File

@ -31,7 +31,7 @@ function selectLocale(event)
chromeRegistry = chromeRegistry.QueryInterface( Components.interfaces.nsIChromeRegistry );
}
var node = event.target;
var langcode = node.getAttribute('data');
var langcode = node.getAttribute('value');
//var old_lang = chromeRegistry.getSelectedLocale("navigator");
//dump("\n-->old_lang=" + old_lang + "--");
chromeRegistry.selectLocale(langcode, true);