finally in ajax call

Solutions on MaxInterview for finally in ajax call by the best coders in the world

showing results for - "finally in ajax call"
Davina
08 Aug 2020
1$.ajax({
2        type: "GET",
3        dataType: dataType,
4        contentType: contentType,
5        async: TRUE,
6        url: $('html form:nth-child(1)').attr('action') + "?" $('html form:nth-child(1)').serialize(),
7        success: function(data) {
8            console.log("FUNFOU!");
9        },
10        error: function(data) {
11            console.log("NÃO FUNFOU!");
12        },
13        complete: function(data) {
14            console.log("SEMPRE FUNFA!"); 
15            //A function to be called when the request finishes 
16            // (after success and error callbacks are executed). 
17        }
18    });