0

I'm having some trouble with some code, I found a script that makes a countdown then sends you to another page, I like the script a lot, I tried editing it to change its look, in this case its font, does this look right to you, I notice its colour is black and not white, can you see errors there at the top in defining its font?

<span id="countDownText +countDownTime+" style="font-size: 14px; font-family: Arial, sans-serif color: #FFFFFF; </span>

<h1 align="center">
<script language="JavaScript">
var countDownInterval=15;
var countDownTime=countDownInterval+1;
function countDown(){
countDownTime--;
if (countDownTime <=0){
countDownTime=countDownInterval;
clearTimeout(counter)
window.location="IT Reveal.html";
return
}
if (document.all) //if IE 4+
document.all.countDownText.innerText = countDownTime+" ";
else if (document.getElementById) //else if NS6+
document.getElementById("countDownText").innerHTML=countDownTime+" "
else if (document.layers){ //CHANGE TEXT BELOW TO YOUR OWN
document.c_reload.document.c_reload2.document.write('Launching in <b </b> seconds')
document.c_reload.document.c_reload2.document.close()
}
counter=setTimeout("countDown()", 1000);
}

function startit(){
if (document.all||document.getElementById) //CHANGE TEXT BELOW TO YOUR OWN
document.write('Launching in <b id="countDownText">'+countDownTime+' </b> seconds')
countDown()
}

if (document.all||document.getElementById)
startit()
else
window.onload=startit
setTimeout("location.href='IT Reveal.html" , t)
</script>
2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by Pleasant Day
0

To change the look and feel of the countdown apply the style to the <h1> element and not the <span> because this is where the countdown text is written

Remove the style from the <span> tag and change

<h1 align="center">

to

<h1 align="center"  style="font-size: 14px; font-family: Arial, sans-serif; color: #FFFFFF;">
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.