To begin with:
Code:
function keeptrack(){
window.status="Image "+(which+1)+" of "+photos.length
}
Isn't exactly unused. However, it was written at a time when javascript could routinely rely upon being able to write to the status bar of the browser. This is pretty much no longer the case though, except in IE and some other browsers, but only if these other browsers are configured to allow it.
So, window.status isn't exactly a string that you can read and write. If you write to it but can't, when you go to read it later, it will be something other than you tried to write to it, if it is anything at all.
It gets worse, you cannot document.write() to a page once it has been parsed by the browser without overwriting all of its content. So, this type of thing:
<script>
document.write("Image "+(which+1)+" of "+photos.length)
</script>
I thought it should be easier than this but the code:
document.write(window.status) yeilds an error and the code:
document.write(+window.status) will only show a 0 where "Image 1 of 20" should be.
. . . all in all, not a very good idea.
You could hard code a span on the page, put it anywhere you like, make it look like so:
HTML Code:
<span id="imagecount"></span>
Then modify that useless old keeptrack() function to look like so:
Code:
function keeptrack(){
var countspan=document.getElementById? document.getElementById('imagecount') : document.all['imagecount'];
countspan.innerHTML="Image "+(which+1)+" of "+photos.length;
}
Bookmarks