Ver Mensaje Individual
  #2 (permalink)  
Antiguo 05/12/2013, 16:17
zapt142
 
Fecha de Ingreso: julio-2010
Ubicación: La Ciudad Blanca, Mérida-Yucatán
Mensajes: 375
Antigüedad: 13 años, 9 meses
Puntos: 7
Respuesta: Mantener seleccionado

Foreros ya lo he resuelto solo agrega una línea mas
aquí esta el código
Código Javascript:
Ver original
  1. <script type="text/javascript">
  2. function pasar() {
  3.     obj=document.getElementById('alum_dis');
  4.     if (obj.selectedIndex==-1) return;
  5.     valor=obj.value;
  6.     txt=obj.options[obj.selectedIndex].text;
  7.     obj.options[obj.selectedIndex]=null;
  8.     obj2=document.getElementById('alum_equi');
  9.     opc = new Option(txt,valor);
  10.     opc.defaultSelected = true; //<---Aqui
  11.     eval(obj2.options[obj2.options.length]=opc);    
  12. }
  13. function pasar2() {
  14.     obj=document.getElementById('alum_equi');
  15.     if (obj.selectedIndex==-1) return;
  16.     valor=obj.value;
  17.     txt=obj.options[obj.selectedIndex].text;
  18.     obj.options[obj.selectedIndex]=null;
  19.     obj2=document.getElementById('alum_dis');
  20.     opc = new Option(txt,valor);
  21.     eval(obj2.options[obj2.options.length]=opc);    
  22. }
  23. </script>
__________________
--No todos aprendemos de la misma forma, ni a la misma velocidad---