Tenho uma função que chama outra função function refreshEstado(estado, cidade){ $.post( '../busca_estados.php',{ UF: $mUF }, function(data){ $('#result-estado').html(data); refreshCidade(cidade);
/*block marked with []*/ $('#tx_uf').removeAttr("disabled"); $('#tx_cidade').removeAttr("disabled"); ); } another function: function refreshCidade(cidade){ $.post( '../cad_cidade/busca_cidade.php',{ UF: $('#tx_uf').val(), CIDADE: cidade }, function(data){ $('#result-cidade').html(data); } ); } I want only when the function refreshCidade () ends his post the refreshEstado () execute the block marked with [] and what comes after it