Ver Mensaje Individual
  #2 (permalink)  
Antiguo 16/05/2016, 06:33
Avatar de petit89
petit89
 
Fecha de Ingreso: marzo-2011
Mensajes: 1.139
Antigüedad: 13 años, 11 meses
Puntos: 171
Respuesta: Selects dependientes

Código Javascript:
Ver original
  1. function TC() {
  2.         $(document).ready(function() {
  3.             $("#equi").change(function() {
  4.                 var equipo= $("#equi").val();
  5.                     $('#NOMBRE_CAMPO_CAPITAN').prop('selectedIndex',0); /*AQUI CAMBIA EL NOMBRE*/
  6.                 $.ajax({
  7.                     type: "post",
  8.                     url: "manejo.php",
  9.                     data: "equipo=" + equipo,
  10.                     success: function(data) {
  11.                         $("#entre_repo").html(data);
  12.                        
  13.                     }
  14.                 });
  15.             });
  16.         });
  17.      
  18.     }
__________________
█ WebHosting / Reseller a bajo costo | Uptime Garantizado | Soporte en Español e Ingles
¿Te sirvió la respuesta? Deja un +1 (Triangulo negro al lado derecho)