Tizag.com Webmaster Tutorials - A collection of webmaster tutorials from HTML to PHP.

Saturday, October 4, 2008

Display Page after Interval

<label id=d2> </label>
<script>




var milisec=0
var seconds=5
//document.frm2.d2.value='10'
document.getElementById("d2").innerHTML='5';

function display(){
if (milisec<=0){
milisec=9
seconds-=1
}
if (seconds<=-1){
milisec=0
seconds+=1
}
else
milisec-=1
//document.frm2.d2.value=seconds+"."+milisec
document.getElementById("d2").innerHTML=seconds+"."+milisec
setTimeout("display()",100)
}
display()

function delayer(){
if(document.getElementById("hidval").value==1){
//window.location = "http://www.apps4rent.com/payment-cpanel.html";
window.location = "validcc.html";
}else{
//window.location = "index.php";
window.location = "invalidcc.html";
}
}
setTimeout('delayer()', 5000)
</script>

No comments: