var array = new Array();
$.get('comics.txt', function(data) {
array = data.split(",");
for(var i = 0; i < array.length; i++)
{
var $page = array[i];
$.ajax({
url: $page,
success: function(data) {
alert(data);
}
});
}
});
comics.txt is a file which contains some urls, separated by commas.
In the above code, the $.ajax call does not work; $page is the correct url, but it's not working in the context. alert(data) causes a blank alert box to come up. I need help figuring out a way to get the data from each page in the array called array.
Thanks ahead of time.