Combobox dinâmico com cadastro AJAX

por em AJAX (2) comentários
Cara, não é ‘algo comum’, mas achei interessante essa dúvida, e resolvi montar. Em funcionamento: http://www.wbruno.com.br/scripts/form-cidade.php config.inc.php <?php header("Content-Type: text/html; charset=ISO-8859-1"); //Evitando cache de arquivo header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Last Modified: '. gmdate('D, d M Y H:i:s') .' GMT'); header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0'); header('Pragma: no-cache'); header('Expires: 0'); session_start(); ///* define('SERVIDOR', [...]

Combobox preenche input AJAX

por em AJAX,jQuery (47) comentários
Eu tô estudando AJAX com jQuery.. dá uma olhada.. você vai precisar do jQuery: script corrijido para versões jquery 1.4.2 index.php <html> <head> <script type="text/javascript" src="jquery-1.4.2.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("select[name='nome']").change(function(){ var endereco = $("input[name='endereco']"); var telefone = $("input[name='telefone']"); $( endereco ).val('Carregando...'); $( telefone ).val('Carregando...'); $.getJSON( 'function.php', { idCliente: $( this ).val() }, function( json ) [...]