php - When page is loading ajax not response -
i have progress bar, t work when page not loading, if page loading example inserting data database progressbar not, work when finish inserting data, wring code ? <script> $(document).ready(function() { // setinterval(function() { $.get("currentprogress.php", { }, function(data) { $('#progress_bar').width(data +"%"); $('#progress_completed').html(parseint(data) +"%"); } )},1000); }); </script> in php loop: $_session['value'] +=1; and in currentprogress.php: <?php session_start(); echo $_session['value']; ?>