SkyD Posted February 24, 2009 Report Share Posted February 24, 2009 Sveiki. Otro dienu cīnos un meklēju kā ar ajax updeitot datus ik peec kaut kaada laika.. Izmantoju shim meerkjim jquery. Tātad līdz šim man ir šādi. Un nekādi neizprotu, kapēc nestrādā. <html> <head> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/jquery.timer.js"></script> </head> <body> <script type="text/javascript"> $.timer(50, function (timer) { $('#container_load').show(); $('#container').hide(); $.ajax({ type: "GET", processdata: false, global: false, url: "dati.php", error: function(){ $('#container_load').hide(); $("#container").text('Kļūda'); }, success: function(data){ $('#container_load').hide(); $('#container').show(); $("#container").html(data); } }) timer.reset(50); }); </script> <div id="container_load" class="spinner"></div> <div id="container" style="display: block;"></div> </body> </html> Quote Link to comment Share on other sites More sharing options...
v3rb0 Posted February 24, 2009 Report Share Posted February 24, 2009 (edited) window.setInterval(function() { // te tas ko vajag darit katru sekundi. // .. }, 1000); nav po džedajiski ar js frameworku, bet darbosies. Edited February 24, 2009 by v3rb0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.