0

I have a webpage that doesn't work fine. I have this code :

<div id="sc_stats"><?php include_once 'sc_statsm.php'; ?></div>

<script type="text/javascript">
var refreshId = setInterval(function() {
    $.get("sc_statsm.php", function(data) {
        $("#sc_stats").html(data);
    });
}, 10000);
</script>

I want to reload the "div" with the php every 10 seconds. It only load one time later doesn't load anymore it stay with the same text. The file sc_Stats.php gets a xml that changes automatically.

EDIT : I see it loads every 10 seconds but the problem is it don't post the new text. Sorry for my bad english

Xtay Gamer
  • 21
  • 4

1 Answers1

1

Okay, finally I make it work with the help of Louys I just disabled the Ajax cache

$.ajaxSetup({ cache: false });
Xtay Gamer
  • 21
  • 4