I’ve solved my pesky little “timed link” problem from a while back with a DHTML script. It’s basically a text slide show that jumps to a specified URL after the last line is displayed. A pretty nifty script all in all. You can even adjust the timing and play with the fonts a bit. Anyway . . . It seems to work perfectly except that there is a fairly large space between the text and the ad banner that displays above it. This causes the image slideshow below the text to display below the bottom of the browsers initial field of vision. Visitors would have to scroll down to see the image show. Since the content of the text and images are tied together (as far as subject matter) this creates a small problem. So I was wondering if there might be a way to position the text slideshow further up on the page. I was also curious about the onload tag at the end of the script. Does this need to be moved up into my initial BODY tag with the rest of my onload events? It doesn’t seem to be causing a problem, but perhaps it should be done for the sake of form. Here’s a link to my site, and below that the script itself. On the page the script begins just after the BODY tag (i.e. BODY, bg, font & link attributes, and onload events) . . .
[URL=http://www.angelfire.com/rock/tillhell]My site . . .
[B]The script . . .
<div id=”splashcontainer” style=”position:absolute;width:350″></div>
<layer id=”splashcontainerns” width=450></layer>
<script>
//configure delay in miliseconds between each message (default: 2 seconds)
var intervals=4000
//configure destination URL
var targetdestination=”
//configure messages to be displayed
var splashmessage=new Array()
var openingtags='<font color=”#666666″ size=”5″>’
splashmessage[0]=”<I>From the creative minds of . . .</I>”
splashmessage[1]=”<B>Dr. Samual J. Robertson II,<BR> <I>Practitioner of Reality . . .</I></B>”
splashmessage[2]=”<I>and . . .</I>”
splashmessage[3]=”<B>~Maxx . . .</B>”
var closingtags='</font>’
//Do not edit below this line
var i=0
function displaysplash_ie(){
if (i<splashmessage.length){
sc_ie.style.visibility=”hidden”
sc_ie.innerHTML='<b><center>’+openingtags+splashmessage[i]+closingtags+'</center></b>’
sc_ie.style.top=document.body.scrollTop+document.body.clientHeight/2-sc_ie.offsetHeight/2
sc_ie.style.visibility=”visible”
i++
}
else{
window.location=targetdestination
return
}
setTimeout(“displaysplash_ie()”,intervals)
}
function displaysplash_ns(){
if (i<splashmessage.length){
sc_ns.visibility=”hide”
sc_ns.document.write(‘<b>’+openingtags+splashmessage[i]+closingtags+'</b>’)
sc_ns.document.close()
sc_ns.left=pageXOffset+window.innerWidth/2-sc_ns.document.width/2
sc_ns.top=pageYOffset+window.innerHeight/2-sc_ns.document.height/2
sc_ns.visibility=”show”
i++
}
else{
window.location=targetdestination
return
}
setTimeout(“displaysplash_ns()”,intervals)
}
function positionsplashcontainer(){
if (document.all){
sc_ie=document.all.splashcontainer
sc_ie.style.left=document.body.scrollLeft+document.body.clientWidth/2-sc_ie.offsetWidth/2
sc_ie.style.top=document.body.scrollTop+document.body.clientHeight/2-sc_ie.offsetHeight/2
displaysplash_ie()
}
else if (document.layers){
sc_ns=document.splashcontainerns
sc_ns.left=pageXOffset+window.innerWidth/2-sc_ns.document.width/2
sc_ns.top=pageYOffset+window.innerHeight/2-sc_ns.document.height/2
sc_ns.visibility=”show”
displaysplash_ns()
}
else
window.location=targetdestination
}
window.onload=positionsplashcontainer
</script>