I use the jQuery Validation Plugin to check the form fields for completion. An example is here . How to make a pop-up window appear immediately after sending a form with the results of sending form data?
1 answer
Try pushing away from this example:
$('#submit_button').click(function(){ $.ajax({ url: 'form_action.php', type: 'POST', dataType: 'html', data: $('#form_id').serialize(), success: function(response) { alert(response); // отправлено удачно }, error: function(response) { alert(response); // ошибка } }); }); |