Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [AJAX]Kolidacja 2 skryptow
Ulysess
post
Post #1





Grupa: Zarejestrowani
Postów: 695
Pomógł: 65
Dołączył: 27.07.2009
Skąd: Y

Ostrzeżenie: (0%)
-----


mam taki problem.. otóż na 1 stronie potrzebuje wyświetlić dynamicznie dane w panelu i czacie dlatego wstawiłem 2x ten sam skrypt i tu pojawia się problem.. otóż dane w panelu nie wyświetlają się od razu tylko dopiero gdy funkcja odświeża.

skrypty wyglądają następująco:

  1. <script type="text/javascript">
  2. function refresh() {
  3. var req = mint.Request();
  4. req.OnSuccess = function () { document.getElementById("ajax_panel").innerHTML = this.responseText;},
  5. req.OnError = function () {document.getElementById("ajax_panel").innerHTML = "Wystąpił błąd !!! <br/>" + this.responseText + "<br/>" + req.xmlHttpRequest.statusText ;}
  6. req.Send ("ajax/panel.php");
  7. }
  8. var ginter=setInterval(refresh, 90000);
  9. </script>
  10.  
  11. <script type="text/javascript">
  12. function refresh() {
  13. var req = mint.Request();
  14. req.OnSuccess = function () { document.getElementById("ajax_gospoda").innerHTML = this.responseText;},
  15. req.OnError = function () {document.getElementById("ajax_gospoda").innerHTML = "Wystąpił błąd !!! <br/>" + this.responseText + "<br/>" + req.xmlHttpRequest.statusText ;}
  16. req.Send ("ajax/gospoda_zawartosc.php<?php echo $link;?>");
  17. }
  18. var ginter=setInterval(refresh, 20000);
  19.  



Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 21.08.2025 - 15:07