<meta http-equiv="Content-Type" content="text/html; charset=windows-1250"/> <form action='chat.php' method='post'> Autor: <input type='text' name='autor' /><br> Treść: <input type='text' name='tresc' style='width: 500px;' /><br> <input type='submit' value='OK'/> </form> <hr> <iframe frameborder='0' width='700px' src='chat2.php'> <script language="JavaScript" src="refresh.js"></script> <?php $autor = $_POST['autor']; $tresc = $_POST['tresc']; $wynik = "<b>".$autor."</b>: ".$tresc."rn"; for ($i = 0; $i<count($plik1); $i++) { } for ($i=0; $i<5; $i++) { } } else { for ($i=0; $i<5; $i++) { } } ?> </iframe>
A to odświeżanie:
ID=window.setTimeout("refresh();",10000); function refresh() { location.reload(); ID=window.setTimeout("refresh();",10000); }
Nie jestem pewien, czy działa to odświeżanie, ale wydaje mi się, że nie, bo 10 sekund po załadowaniu strony ta "ani drgnie", żadnego "błysku" odświeżania. Widzicie jakieś błędy? Zaznaczam, że sam czat działa jak należy.