Mozilla/mozilla/editor/ui/dialogs/content/EdDialogCommon.js
cmanske%netscape.com 5cc87fa56e Added support for prefs and string bundles for editor, various bug fixes, preliminary Horizontal Line dialog work
git-svn-id: svn://10.0.0.236/trunk@34343 18797224-902f-48f8-a5cc-f745e15eee43
1999-06-09 01:27:08 +00:00

30 lines
701 B
JavaScript

function ClearList(list)
{
for( i = (list.length-1); i >= 0; i-- ) {
list.remove(i);
}
}
function AppendStringToList(list, string)
{
// THIS DOESN'T WORK! Result is a XULElement -- namespace problem
//optionNode1 = document.createElement("option");
// "Unsanctioned method from Vidur:
// createElementWithNamespace("http://... [the HTML4 URL], "option);
// This works - Thanks to Vidur! Params = name, value
optionNode = new Option(string, string);
if (optionNode) {
list.add(optionNode, null);
} else {
dump("Failed to create OPTION node. String content="+string+"\n");
}
}
// All dialogs share this simple method
function onCancel()
{
window.close();
}