My Browser shows deprecation warning, when i do ajax call. I need the script to wait for the feedback before the value can be stored in variable for next progress
Here's my chunck of code:
url='https://data.com/txt';
var templastprice=0;
var tempvalue=0;
jQuery.ajax({
type: 'GET',
url: url,
dataType: 'json',
success: function(data){
templastprice=data['ticker']['last'];
tempvalue=="0";
},
async: false
});
I don't think this is a good approach for the future, any suggestion to fix this ?
Thanks