Answer the question
In order to leave comments, you need to log in
How to display the received value in the global scope?
Hello!
Guys, tell me how can I display a variable from $.ajax.
var blabla,
$.ajax({
type: 'GET',
dataType: "json",
url: 'http://app.hhh.local/handler.php?number=' + value + '&organization_type=counters'
}).done(function(data) {
blabla = data;
}).fail(function(data) {
console.log('fail');
});
console.log(blabla); //undefined
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question