fixed proxy to to add options to a selectbox, needed by IE ;-)

This commit is contained in:
Ralf Becker 2005-06-11 20:11:41 +00:00
parent 21f71e934c
commit 68074ad82e

View File

@ -80,18 +80,12 @@ function activate_tab(tab,all_tabs,name)
function selectbox_add_option(id,label,value,do_onchange)
{
selectBox = document.getElementById(id);
/*alert('selectbox_add_option('+id+','+label+','+value+') '+selectBox);*/
for (i=0; i < selectBox.length; i++) {
if (selectBox.options[i].value == value) {
selectBox.options[i].selected = true;
break;
}
else if (value.slice(0,1) == "," && selectBox.options[i].value.slice(0,1) == ",") {
selectBox.options[i].value = value;
selectBox.options[i].text = "multiple*";
selectBox.options[i].title = label;
selectBox.options[i].selected = true;
break;
}
}
if (i >= selectBox.length) {
selectBox.options[selectBox.length] = new Option(label,value,false,true);