Ver Mensaje Individual
  #1 (permalink)  
Antiguo 16/01/2009, 10:48
Rogant
 
Fecha de Ingreso: agosto-2004
Mensajes: 38
Antigüedad: 20 años, 7 meses
Puntos: 0
Exclamación Problema Con Select Dinamico

Buenos dias Tengo un poblema al intentar borrar los option de un select dinamico se blokea el firefox al realisar la validacion
esete es el codigo js
Código javascript:
Ver original
  1. function CallOpt(Node,JSs){
  2.      
  3.         while (Node.firstChild) {
  4.        
  5.                if(Node.firstChild.id=='del'){
  6.                Node.removeChild(Node.firstChild);
  7.                }
  8.         }
  9.  
  10.   if(JSs.value=="" || JSs.value==null){
  11.  
  12.     Node.setAttribute('disabled','disabled');
  13.  
  14.   }else{
  15.  
  16.   JSa = eval("(" + JSs.value + ")");
  17.  
  18.     for(cont=0;cont<JSa[0].length;cont++){
  19.         elemento=document.createElement('option');
  20.         var puntero=Node;
  21.         puntero.appendChild(elemento);
  22.         nodotexto=document.createTextNode(JSa[1][cont]);
  23.         elemento.appendChild(nodotexto);
  24.         elemento.setAttribute('value',JSa[0][cont]);
  25.         elemento.setAttribute('id','del');
  26.  
  27.     }
  28.   }
  29. }

y la llamada es la siguiente

Código php:
Ver original
  1. <select name="Comuna" onchange="do_web_service3_CallBarr();" onblur="CallOpt(document.form1.CBarrio,document.form1.Hcom);">
  2.                               <option value="<?php echo $row_Candidato['Comuna']; ?>" id="notdel" selected="selected">Seleccionar</option>
  3.                           </select>

Gracias

Última edición por Rogant; 16/01/2009 a las 12:27