Fake counter

Status
Not open for further replies.
2 comments
Lots of them if you search google. Here is a simple one you can use to create your own. If you want it to count up use + instead of minus on the number. :)
Code:
<HTML> 
<HEAD><TITLE>detect and redirect</TITLE> 

<script LANGUAGE="Javascript"> 
var start=new Date(); 
start=Date.parse(start)/1000; 
var counts=10; 
function countdown(){ 
var now=new Date(); 
now=Date.parse(now)/1000; 
var x=parseInt(counts-(now-start),10); 
if(document.form1){document.form1.clock.value = x;} 
if(x>0){ 
timerID=setTimeout("countdown()", 100) 
}else{ 
switch(screen.width) 
{ 
case 800: goToPage('medres.php'); break; 
case 1024: goToPage('hires.php'); break; 
} 

function goToPage(url) 

{ 
document.location.replace(url); 
alert('your screen setting is '+screen.width+'x'+screen.height+', redirecting for optimal viewing'); 

} 
} 
} 

</script> 
<script LANGUAGE="Javascript"> 
window.setTimeout('countdown()',100); 
</script> 

</HEAD> 
<BODY BGCOLOR="black" > 

<FORM NAME="form1"> 
In 

<INPUT TYPE="text" NAME="clock" SIZE="2" VALUE="10"> 

seconds the page will auto detect your screen resolution for optimal viewing. If you are NOT redirected, you can view our site by clicking <A href="medres.htm">HERE</A><P> 

</FORM> 

</BODY> 

</HTML>
 
Status
Not open for further replies.
Back
Top