Ver Mensaje Individual
  #3 (permalink)  
Antiguo 05/01/2010, 09:14
turfeano
 
Fecha de Ingreso: diciembre-2008
Mensajes: 190
Antigüedad: 15 años, 4 meses
Puntos: 6
Respuesta: select interactiva ¿qué estrategia utilizar?

como bien dijo con ajax algo asi seria :

Código:
  
<script type="text/javascript">
function objetoAjax(){
 var xmlhttp=false;
  try{
   xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
  }catch(e){
   try {
    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
   }catch(E){
    xmlhttp = false;
   }
  }
  if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
   xmlhttp = new XMLHttpRequest();
  }
  return xmlhttp;
}

function cambioSelect(variable){

 divContenido = document.getElementById('iddeltextarea');
 ajax=objetoAjax();
 //uso del medoto GET
//en el siguiente archivo php debe estar tu consulta
 ajax.open("GET", "consulta.php?"+ variable);
 divContenido.innerHTML= 'Realizando petición...';
 ajax.onreadystatechange=function() {
  if (ajax.readyState==4) {
   //mostrar resultados en esta capa
   divContenido.value = ajax.responseText
// si fuera un div pones divContenido.innerHTML = ajax.responseText
  }
 }
 
 ajax.send(null)
}

    </script>
saludos espero sirva