FlashO
04-24-2008, 11:17 AM
Hi กกก
I have this code for move all register in a multiselect. My problem is that this code work perfect in Internet Explorer but no work in firefox. Because???
Can you help me please??
Thankssssss
:thumbsup:
function anadirTodos(val) {
var newOpt
for (k=0;k<val.lista.length;k++) {
newOpt = document.createElement("OPTION");
newOpt.text = val.lista.options[k].text;
newOpt.value = val.lista.options[k].value;
val.seleccionados.options.add(newOpt,val.seleccionados.length);
//val.lista.options.remove(k);
}
for (k=0;k<val.lista.length;) {
val.lista.options.remove(k);
}
}
function anadirTodos2(val) {
var newOpt
for (k=0;k<val.lista2.length;k++) {
newOpt = document.createElement("OPTION");
newOpt.text = val.lista2.options[k].text;
newOpt.value = val.lista2.options[k].value;
val.seleccionados2.options.add(newOpt,val.seleccionados2.length);
//val.lista.options.remove(k);
}
for (k=0;k<val.lista2.length;) {
val.lista2.options.remove(k);
}
}
I have this code for move all register in a multiselect. My problem is that this code work perfect in Internet Explorer but no work in firefox. Because???
Can you help me please??
Thankssssss
:thumbsup:
function anadirTodos(val) {
var newOpt
for (k=0;k<val.lista.length;k++) {
newOpt = document.createElement("OPTION");
newOpt.text = val.lista.options[k].text;
newOpt.value = val.lista.options[k].value;
val.seleccionados.options.add(newOpt,val.seleccionados.length);
//val.lista.options.remove(k);
}
for (k=0;k<val.lista.length;) {
val.lista.options.remove(k);
}
}
function anadirTodos2(val) {
var newOpt
for (k=0;k<val.lista2.length;k++) {
newOpt = document.createElement("OPTION");
newOpt.text = val.lista2.options[k].text;
newOpt.value = val.lista2.options[k].value;
val.seleccionados2.options.add(newOpt,val.seleccionados2.length);
//val.lista.options.remove(k);
}
for (k=0;k<val.lista2.length;) {
val.lista2.options.remove(k);
}
}