Tema: select
Ver Mensaje Individual
  #3 (permalink)  
Antiguo 14/03/2007, 18:52
zyon
 
Fecha de Ingreso: septiembre-2005
Mensajes: 1.289
Antigüedad: 19 años, 4 meses
Puntos: 3
Re: select

Podria ser algo asi , pero no lo he probado :

Código HTML:
<SELECT name="cont"  MULTIPLE SIZE="15" STYLE="width:200px;Font:8pt Arial" ><OPTION value='valores'>Valores Vista<OPTION value='valores2'>Valores Vista</SELECT>
<INPUT  type="button"  name="agrega1" value="  >>  "  onclick="moveValList(cont,cont1)">
<INPUT  type="button"  name="back1"   value="  <<  "  onclick="moveValList(cont1,cont)">
<SELECT name="cont1" MULTIPLE SIZE="15" STYLE="width:200px;Font:8pt Arial"></SELECT> 
y el JS:

Código HTML:
function moveValList(listFrom, listTo){
    var len = listTo.length;
    if (!len) len=0;

    for (var i=listFrom.length-1; i>=0; i--) {
       if (listFrom.options[i].selected == true) {
             s_frm = listFrom.options[i].text;
             s_val = listFrom.options[i].value;
             //window.alert('S_FRM: '+s_frm);
             //window.alert('S_val: '+s_val);
             listTo[len++] = new Option(s_frm, s_val);
             listFrom.options[i] = null;

          }
    }
 }
mmm no se si eso te auide de algo, no estoy seguro, es que no tengo el codigo a la mano... sorry, Saludos!
__________________
Wow! No se que decir...