V
V
Vyacheslav2016-01-21 18:50:50
Python
Vyacheslav, 2016-01-21 18:50:50

How to trigger error event in jquery?

You need to validate the data on the server side. How can I fake an error in the response so that the code below works?

$.ajax({
    error: function (response) {
                 "blabla"
            }
    });

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nirvimel, 2016-01-21
@Firik67

Return code 404 or any 4XX.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question