Hi all
The below script now writes a list of websites incrementing in number. At the moment I have to go through all the websites one by one by clicking them. The websites are pdf download addresses. Most of the address are duff and not worth opening. Is there anyway of finding out how large the file is without opening it up? Ie having the website in the list and the size next to it? the only way to do this is with php is that correct?
code:
<script type="text/javascript">
function showLinks(links){
document.getElementById("links").innerHTML = links;
}
//This function actually makes the link list show.
function showLinks(links){
document.getElementById("links").innerHTML = links;
}
//This is the function for building the list
function buildList(){
//This is what we use to determine where the loop will start
var start = 1;
//This is what we use to determine where the loop will start
var end = 10;
//This Sets the variable so the += will work inside the 'While' function
var links = '';
//This basically says 'Does start = end? If not, add another link
while(start <= end){
//This builds the link list, feel free to edit it so it matches your needs
links += '<a href="http://www.address.com/?id='+start+'" target="_blank">http://www.address.com/?id='+start+'</a><br />';
/*This checks to see if the list is done being built. If it is, it will call the function that shows the link list*/
if(start==end)showLinks(links);
//This simply adds 1 to the start variable
start++;
}
}
</script>
<body onload="buildList()">
<div id="links"></div>
</body>