Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [Java][HTML]Od¶wieżanie Iframe
Forum PHP.pl > Forum > Przedszkole
TheBoy
Trzemu to nie działa?
  1. window.setInterval("reloadIFrame();", 1000);
  2.  
  3. function reloadIFrame() {
  4. document.frames["testowy"].location.reload();
  5. }
  6. <iframe id="czat" width="100%" height="450" src="http://racegame.pl/chat_script.php?chat=1&typ=1" name"testowy" style="border-width: 2px;" onLoad="if(wartosc_przewijania == null) { wartosc_przewijania = 9999; document.getElementById('czat').contentWindow.scrollTo(0, 9999); } if(wartosc_przewijania > 0) { document.getElementById('czat').contentWindow.scrollTo(0, wartosc_przewijania); }">Nie można załadować czatu</iframe>
lukesh
Tak będzie działać:

  1. document.getElementById('czat').src = document.getElementById('czat').src;
TheBoy
Zrobiłem to innaczej a teraz mam pytanie jak ustawić obok siebie ramki, aby nie była jedna pod drug±.

  1. <script type="text/javascript">
  2. <!--
  3. function starter() {
  4. setTimeout("refresh()",5000);
  5. }
  6. function refresh() {
  7. document.getElementById('chat_zespolu').src="http://racegame.pl/chat_script.php?chat=1&typ=1";
  8. document.getElementById('chat_premium').src="http://racegame.pl/chat_script.php?chat=1&typ=2";
  9. setTimeout("refresh2()",5000);
  10. }
  11. function refresh2() {
  12. document.getElementById('chat_zespolu').src="http://racegame.pl/chat_script.php?chat=1&typ=1";
  13. document.getElementById('chat_premium').src="http://racegame.pl/chat_script.php?chat=1&typ=2";
  14. setTimeout("refresh()",5000);
  15. }
  16. // -->
  17. </head>
  18. <body onload="java script:starter()">
  19. <div><iframe width="50%" height="170" src="http://racegame.pl/chat_script.php?chat=1&typ=1" style="border-width: 2px;" id="chat_zespolu"></iframe><iframe width="50%" height="170" src="http://racegame.pl/chat_script.php?chat=1&typ=2" style="border-width: 2px;" id="chat_premium"></iframe></div>
  20. </body>
binprogrammer
Spróbuj na divach, np.

  1. <div style="float: left;">JEDNA RAMKA <div><div style="float: right;"> DRUGA RAMKA <div>
To jest wersja lo-fi głównej zawarto¶ci. Aby zobaczyć pełn± wersję z większ± zawarto¶ci±, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.