Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/07/2015, 01:01
jpaulxD
 
Fecha de Ingreso: mayo-2015
Mensajes: 23
Antigüedad: 9 años
Puntos: 0
Pregunta Pasar options de 2 select a un solo select sin que se repitan

Hola
He probado esto pero solo me pasa las options del select1 al select3.
Si uso la segunda funcion me pasa del select2 al select3.

function boton_onclick() {
select3.options.length = select1.options.length;

for (a = 0; a < select1.options.length; a++) {

select3.options[a].value = select1.options[a].value;
select3.options[a].text = select1.options[a].text;
}
}

function boton_onclick(){
select3.options.length = select2.options.length;

for (b = 0; b < select2.options.length; b++) {

select3.options[b].value = select2.options[b].value;
select3.options[b].text = select2.options[b].text;
}
}

Lo que necesito es pasar las options del select1 y select2 al select3 y que no se repitan, agradeceria mucho la ayuda.