var $form = $('form'); $form.bind("submit", function(e){ $.ajax{( success : function ( response ){ if ( response.needReloadPage ) { $form.unbind("submit").submit(); } } )} });