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:
<script type="text/javascript"> function refresh() {
var req = mint.Request();
req.OnSuccess = function () { document.getElementById("ajax_panel").innerHTML = this.responseText;},
req.OnError = function () {document.getElementById("ajax_panel").innerHTML = "Wystąpił błąd !!!
<br/>" + this.responseText + "
<br/>" + req.xmlHttpRequest.statusText ;}
req.Send ("ajax/panel.php");
}
var ginter=setInterval(refresh, 90000);
<script type="text/javascript"> function refresh() {
var req = mint.Request();
req.OnSuccess = function () { document.getElementById("ajax_gospoda").innerHTML = this.responseText;},
req.OnError = function () {document.getElementById("ajax_gospoda").innerHTML = "Wystąpił błąd !!!
<br/>" + this.responseText + "
<br/>" + req.xmlHttpRequest.statusText ;}
req.Send ("ajax/gospoda_zawartosc.php<?php echo $link;?>");
}
var ginter=setInterval(refresh, 20000);