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.