I got a script that puts urls into one iframe by order:
<script type="text/javascript">
$(document).ready(function(){
var array = ['http://www.example1.come', 'http://www.example2.com', 'http://www.example3.com'];
var beforeLoad = (new Date()).getTime();
var loadTimes = [];
$('#1').on('load', function() {
loadTimes.push((new Date()).getTime());
$('#1').attr('src', array.pop());
if (array.length === 0) {
$.each(loadTimes, function(index, value) {
$("#loadingtime"+index).html(value - beforeLoad);
});
}
}).attr('src', array.pop());
});
</script>
I got a txt file with a list of urls. The urls in that file are written in a column (1 column, each url starfs from new line). How can i replace the 'var array' in the javascript with the content of that txt file?