Created
October 31, 2012 17:52
-
-
Save maxwellnewage/3988656 to your computer and use it in GitHub Desktop.
Listbox que genera otro listbox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//escucha el cambio de provincia y guarda dicho valor en una variable. Luego la envia con metodo post a otro | |
//script php que trabaja la informacion y la devuelve generando las opciones de otro listbox | |
$(document).ready(function(){ | |
$("#provincia").change(function () { | |
$("#provincia option:selected").each(function () { | |
elegido=$(this).val(); | |
$.post("comprobar_registro.php", { elegido: elegido }, function(data){ | |
$("#localidad").html(data); | |
}); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment