Consider using the ajaxForm jQuery plugin: http://malsup.com/jquery/form/