mi archivo js
Código :
var x; x= $(document); x.ready(ini); function ini() { $('form').submit(function(event) { event.preventDefault(); var url = $(this).attr('action'); var datos = $(this).serialize(); $.post(url, datos, function(resultado) { $('#datos').html(resultado); }); }); }
Donde form es el name de mi formulario y #datos es mi div con el id correspondiente. en el action del formulario la pagina que esta es php/consulta_datos.php
Espero me puedan ayudar, de antemano muchas gracias por su tiempo y ayuda en este problemita.