I should have seen that. Thanks so much!
I have been using that to check that I was able to change the background regularly as a sort of animation using this where backg() is fired on body load:
<script type="text/javascript">
function backg() {
setInterval(tail(), 2000);
}
function tail() {
document.body.style.backgroundImage = 'url(img/backg.jpg)';
setTimeout("document.body.style.backgroundImage = 'url(img/backg1.jpg)';", 1000);
}
</script>
As it stands, this has the effect of changing the background once, but then it stops. It's as if tail is called once, but not repeated. In fact, I'm pretty sure that's happening because I reversed the image references (i.e. backg1 being set first and then backg being set), which works.
Any thoughts on this?
Thanks again