Ver Mensaje Individual
  #1 (permalink)  
Antiguo 06/10/2009, 13:10
Avatar de hoberwilly
hoberwilly
 
Fecha de Ingreso: julio-2008
Ubicación: Lima - Perú
Mensajes: 769
Antigüedad: 16 años, 7 meses
Puntos: 2
Pregunta Se borra los opcion del select

Hola amigos tengo el siguiente codigo:

<select name="producto" id="producto" style="width:200px" onChange="traerDatos(formcreditos.producto.value)" >>
<option selected="selected">Elige</option>
<?php
while($rowC=mysql_fetch_array($qryC)){
?>
<option value="<?php echo $rowC['ID'] ?>"><?php echo ucfirst($rowC['NOM']); ?></option>
<?php
}
?>
</select>

y este el js:

function traerDatos(listaEsc)
{
var capa=document.getElementById("producto");
var ajax=nuevoAjax();
capa.innerHTML="Cargando...";
ajax.open("POST", "recibe.php", true);
ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
ajax.send("motivo="+listaEsc);
ajax.onreadystatechange=function()
{
if (ajax.readyState==4)
{
capa.innerHTML=ajax.responseText;
var respuesta=ajax.responseText;
var registro = respuesta.split('::~::');
}
}
}

Resultados:

Para el listado de los select me muestra todos los datos, pero una vez seleccionado y pretendo realizar otros selects PERO LOS DATOS NO MUESTRAN.

Agradeciendo de antemano sus colaboraciones,
Saludos,