get value of ajax success in variable

Solutions on MaxInterview for get value of ajax success in variable by the best coders in the world

showing results for - "get value of ajax success in variable"
Salomé
19 Jan 2019
1var return_first = function () {
2    var tmp = null;
3    $.ajax({
4        'async': false,
5        'type': "POST",
6        'global': false,
7        'dataType': 'html',
8        'url': "ajax.php?first",
9        'data': { 'request': "", 'target': 'arrange_url', 'method': 'method_target' },
10        'success': function (data) {
11            tmp = data;
12        }
13    });
14    return tmp;
15}();
16