S
S
Spartacus2020-04-19 09:58:23
JavaScript
Spartacus, 2020-04-19 09:58:23

How to make a thank you box after submitting the form, but not via alert?

There is a form for sending an application, a thank you window is displayed there, but through alert. How to do something differently, not through alert?

submitHandler: function(form) {
  $.ajax({
    type: "POST",
    url: "send.php",
    data: $(form).serialize(),
    success: function (response) {
      alert(' Форма отправлена, мы свяжемся с вами через 10 минут.');   // Вот эту строку бы как то заменить
      $(form)[0].reset();
      modal.removeClass('modal--visible');
    },
  error: function (response) {
    console.error('Ошибка запроса' + response);
  }
  });
 }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
hzzzzl, 2020-04-19
@hzzzzl


style the window and hide it by default when needed - add a class to make it visible

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question