Foros del Web » Programando para Internet » PHP »

traspasar opcinoes de un select a otro

Estas en el tema de traspasar opcinoes de un select a otro en el foro de PHP en Foros del Web. Como puedo hacer esto mismo pero en php? function move(fbox,tbox) { for(var i=0; i<fbox.options.length; i++) { if(fbox.options[i].selected && fbox.options[i].value != "") { var no = ...
  #1 (permalink)  
Antiguo 16/01/2007, 11:05
 
Fecha de Ingreso: junio-2004
Mensajes: 170
Antigüedad: 19 años, 10 meses
Puntos: 0
Pregunta traspasar opcinoes de un select a otro

Como puedo hacer esto mismo pero en php?

function move(fbox,tbox) {

for(var i=0; i<fbox.options.length; i++) {
if(fbox.options[i].selected && fbox.options[i].value != "") {
var no = new Option();
no.value = fbox.options[i].value;
no.text = fbox.options[i].text;
tbox.options[tbox.options.length] = no;
fbox.options[i].value = "";
fbox.options[i].text = "";
}

}


aux= aux+tbox.options[a].value + ',';
// alert(aux);
a=a+1;

BumpUp(fbox);

return aux;

}

function BumpUp(box) {
for(var i=0; i<box.options.length; i++) {
if(box.options[i].value == "") {
for(var j=i; j<box.options.length-1; j++) {
box.options[j].value = box.options[j+1].value;
box.options[j].text = box.options[j+1].text;
}
var ln = i;
break;
}
}
if(ln < box.options.length) {
box.options.length -= 1;
BumpUp(box);
}
}

son funciones que sirven para traspasar datos de un select a otro...saludos
  #2 (permalink)  
Antiguo 16/01/2007, 15:10
Avatar de mauricio2004  
Fecha de Ingreso: marzo-2004
Mensajes: 264
Antigüedad: 20 años, 1 mes
Puntos: 0
Re: traspasar opcinoes de un select a otro

tienes que ser mas explicito en tus preguntas, que necesitas hacer realmente

Poco se entiende

Saludos
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 13:03.