Hey Guys,
I've found these java codes from somewhere else. Basically I just paste them before </head> in HTML to make it work. Here they are:
<script language="JavaScript" type="text/javascript">
<!--
var sec = 02; // set the seconds
var min = 59; // set the minutes
function countDown() {
sec--;
if (sec == -01) {
sec = 59;
min = min - 1; }
else {
min = min; }
if (sec<=9) { sec = "0" + sec; }
time = (min<=9 ? "0" + min : min) + " min and " + sec + " sec ";
if (document.getElementById) { document.getElementById('theTime').innerHTML = time; }
SD=window.setTimeout("countDown();", 1000);
if (min == '00' && sec == '00') { sec = "00"; window.clearTimeout(SD); }
}
window.onload = countDown;
// -->
</script>
change this
if (min == '00' && sec == '00') { sec = "00"; window.clearTimeout(SD); }
if (min == '00' && sec == '00') {
sec = "00";
window.clearTimeout(SD);
window.top.location.href = "http://domain.com";
}
Thanks! I'll work it out.