$('input:button').click(function() { var data = $('form:first').serialize(); /* $.ajax( { url: 'process.php', method: 'post', data: $('form:first').serialize(), dataType: 'html', success: function(data) { $('#information').hide(); $('#response').html(data).show(); } }); */ var a = $.post( 'process.php', data, function(data) { $('#information').hide(); $('#response').html(data).show(); }, 'html' ); });