$(function () { $.post('cfdi.php').done(function (respuesta) { $('#cfdiFisica').html(respuesta); }); $.post('cfdiMoral.php').done(function (respuesta) { $('#cfdiMoral').html(respuesta); }); $.post('estado.php').done(function (respuesta) { $('#estados').html(respuesta); }); $('#estados').change(function () { var el_estado = $(this).val(); $.post('ciudades.php', {estado: el_estado}).done(function (respuesta) { $('#ciudades').html(respuesta); }); }); $('#ciudades').change(function () { var la_ciudad = $(this).val(); $.post('cp.php', {ciudad: la_ciudad}).done(function (respuesta) { $('#cp').html(respuesta); }); }); $('#cp').change(function () { var el_cp = $(this).val(); $.post('colonias.php', {cp: el_cp}).done(function (respuesta) { $('#colonia').html(respuesta); }); }); $.post('estado.php').done(function (respuesta) { $('#estadosE').html(respuesta); }); $('#estadosE').change(function () { var el_estadoE = $(this).val(); $.post('ciudades.php', {estado: el_estadoE}).done(function (respuesta) { $('#ciudadesE').html(respuesta); }); }); $('#ciudadesE').change(function () { var la_ciudadE = $(this).val(); $.post('cp.php', {ciudad: la_ciudadE}).done(function (respuesta) { $('#cpE').html(respuesta); }); }); $('#cpE').change(function () { var el_cpE = $(this).val(); $.post('colonias.php', {cp: el_cpE}).done(function (respuesta) { $('#coloniaE').html(respuesta); }); }); $.post('estado.php').done(function (respuesta) { $('#estadosF').html(respuesta); }); $('#estadosF').change(function () { var el_estadoF = $(this).val(); $.post('ciudades.php', {estado: el_estadoF}).done(function (respuesta) { $('#ciudadesF').html(respuesta); }); }); $('#ciudadesF').change(function () { var la_ciudadF = $(this).val(); $.post('cp.php', {ciudad: la_ciudadF}).done(function (respuesta) { $('#cpF').html(respuesta); }); }); $('#cpF').change(function () { var el_cpF = $(this).val(); $.post('colonias.php', {cp: el_cpF}).done(function (respuesta) { $('#coloniaF').html(respuesta); }); }); });