Hallo,
ich habe folgenden Javascript-Code:
<script language="JavaScript">
<!--
var countDownInterval=46
var countDownTime=countDownInterval;
function countDown()
{
--countDownTime;
if (countDownTime < 0)
{
countDownTime=countDownInterval;
}
document.getElementById('countDownText').innerText = countDownTime;
setTimeout("countDown()", 1000);
if (countDownTime == 0)
{
<?
echo "window.location="success_top.php?mailid=$_GET[mailid]&username=$_GET[username]";;";
?>
}
}
// -->
</script>
Countdown erfolgt in <b id="countDownText"></b> Sekunden.
<script language="JavaScript">
<!--
setTimeout("countDown()", 1000);
// -->
</script>
Dieser Code funktionier beim IE auch problemlos. Allerdings funktioniert dass innerText Attribut nicht bei Netscape. Wer kann mir eine mögliche Implementierung dieses Countdowns sagen, der für alle Browser funktioniert.
Vielen Dank schonmal und viele Grüße
Beni