Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/05/2007, 03:43
perikobermio
 
Fecha de Ingreso: diciembre-2006
Mensajes: 53
Antigüedad: 17 años, 5 meses
Puntos: 0
Añadir option a una select

Muy buenas a todos, antes de nada deciros que ya he dado un repaso al FAQ y aunque he visto bastantes opciones ninguna me ha funcionado.

el problema es que tengo que añadir una serie de opciones a una select, y no doy con una solucion. Esto es lo que tengo:

Código PHP:
function seleta()
    {
    
seleta=document.getElementById('seleta');
    
kondi=document.getElementById('kondi');
    var 
tabla=seleta.options[seleta.selectedIndex].value;
    
xmlHttp=ajaxFunction();
    
xmlHttp.onreadystatechange=function()
        {
        if(
xmlHttp.readyState==4)
            {
            
katie=xmlHttp.responseText.split("**");
            var 
0;
            while(
katie[i] != null)
                {
                
kondi.options[i]=new Option(katie[i],katie[i]);
                
i++;
                }
            }
        }
    
xmlHttp.open("GET","ajax.php?tabla=" tabla,true);
    
xmlHttp.send(null);
    } 
si alguien tiene alguna sugerencia, agradeceria cualquier ayudita.

gracias por adelantado.