Ver Mensaje Individual
  #2 (permalink)  
Antiguo 14/10/2010, 07:33
kokoou
 
Fecha de Ingreso: enero-2008
Ubicación: Buenos Aires
Mensajes: 305
Antigüedad: 16 años, 3 meses
Puntos: 14
Respuesta: Selects dependientes

Código Javascript:
Ver original
  1. $(document).ready(function() {
  2.  
  3.         $("#loading").ajaxStart(function(){
  4.                 $(this).show();
  5.                 $('#resultado').hide();
  6.         });
  7.  
  8.         $('#select_provincias').live('change', function() {
  9.                 $.ajax({
  10.                   type:"POST",
  11.                   url:"<?php echo base_url();?>"+"index.php/ajax/selects_filtro_portada",
  12.                   data:"provincia="+$('#select_provincias').val(),
  13.                   success: function(data){
  14.                         $('#resultado').html(data);
  15.                   }
  16.                 });
  17.             });
  18.  
  19.        $('#select_subzonas').live('change', function() {
  20.                 $.ajax({
  21.                   type:"POST",
  22.                   url:"<?php echo base_url();?>"+"index.php/ajax/selects_filtro_portada2",
  23.                   data:"subzona="+$('#select_subzonas').val(),
  24.                   success: function(data){
  25.                         $('#resultado2').html(data);
  26.                   }
  27.                 });
  28.             });
  29.  
  30.             $("#loading").ajaxStop(function(){
  31.                 $(this).hide();
  32.                 $('#resultado').show();
  33.             });
  34. });