i'l truly sorry for my bad english at first.
I do not know if my problem comes of it, but, when I browse my program in the debugger, I have the impression that my "for" is forgot and it passes has the continuation.
My Code:
var nextToken = 50/maxResults;
urlToken=url;
for(var k=0;k<nextToken;k++)
{
var newToken;
$.ajax({
url:urlToken,
async:false,
dataType:'json',
success:function(data){
$.getJSON(url,function(data){
$tokenD = data;
newToken = data.nextPageToken;
});
}
});
urlToken = "https://www.googleapis.com/youtube/v3/playlistItems?pageToken="+newToken+"&part=snippet&playlistId="+playlistId+"&key="+key+"&maxResults="+maxResults+"";
}
url = urlToken;
$('div#container').empty();
So in this code, in the debugger, i arrived to "$('div#container').empty();" before the for was finished. I don't know if my problem comes of the ajax request but i don't think so.
If you have any idea =).