Mailinglisten-Archive |
> könntest Du mir die Funktion: STARTZEIT() mal zukommen lassen?
..kann man sich auch selber zusammensuchen...
..oder sogar mit php machen... ;-)
-------snip count.js---------
<!-- Hide from old browsers
function STARTZEIT(){
var time= new Date();
hours= time.getHours();
mins= time.getMinutes();
secs= time.getSeconds();
closeTime=hours*3600+mins*60+secs;
closeTime+=5; // 5 Sekunden
ZEIT();
}
function timeLeft() {
count = closeTime-curTime;
document.ZEIT.Zaehler.value = " " + count
window.setTimeout("ZEIT()",1000)
}
-->
------------snap--------------
<head>
<SCRIPT LANGUAGE="JavaScript" SRC="count.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!--
function ZEIT(){
var time= new Date();
hours= time.getHours();
mins= time.getMinutes();
secs= time.getSeconds();
curTime=hours*3600+mins*60+secs
if(curTime>=closeTime)
location.href="file.php?datei=<?php echo $datei; ?>";
else
timeLeft();
}
-->
</SCRIPT>
</head>
<body onLoad="STARTZEIT()" ......>
[...]
if ($browser_name == "Netscape") { ?>
<form name="ZEIT">
<input size="3" type=text value="" name="Zaehler"></INPUT>
</form>
<?php } else { ?>
<form name="ZEIT">
<input style="position:absolute;
left:480; top:176;
WIDTH=50; HEIGHT=40;
background color:black;
color:snow; font-family:Verdana;
font-size:24pt;" type=text value="" name="Zaehler">
</INPUT>
</form>
<?php } ?>
gruesse
Christoph
php::bar PHP Wiki - Listenarchive