D
D
Dmitry Vasechka2017-07-05 17:38:57
PHP
Dmitry Vasechka, 2017-07-05 17:38:57

How do I stop the page from refreshing when an email is sent via ajax?

Good day!
Please tell me how to make sure that the page is not updated when sending an email?
The site where this happens is kitchen.dimavak6.bget.ru
The letter script is taken from https://habrahabr.ru/sandbox/93363/

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2017-07-05
@MusicDeveloper

Good afternoon.

$("#form").submit(function(e){
   e.preventDefault()
   // остальной код
}

V
Vyacheslav, 2017-07-05
@Firik67

After alert() add return false;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question