I have recently started using ajax requests. I have the request working but it takes multiple seconds to load.
Code-
var x = 0;
function makeTR(){
var appendObject = "<tr>";
for(var i = 0; i < 3; i++){
$.ajax({
async: false,
type: 'GET',
url: domain + Players[x] + domain2,
success: function(data) {
appendObject = appendObject + "<td>" + makeTD(data.player, data.rank, data.guild_rank, data.fame, data.last_seen) + "</td>";
x++;
}
});
}
appendObject = appendObject + "</tr>";
return appendObject;
}
If you need anymore code I will give it to you, this is the only part where there is any real code though.
Sorry if there is another post out there, I looked for a while.
Thanks in advance!