TeddyKiller Posted May 13, 2010 Share Posted May 13, 2010 I have some ajax code, done in jquery. I'm wanting a progress bar. The page takes so long to load. It can be 1 second, or it can take minutes. It all depends on whats exactly happening with it. Lets say a clan has 10 clan members. It updates those users with information grabbed by another site. This will give it time. So with the ajax script, where it has "loading" I'd like some sort of progress bar, so that no matter how long it takes for the results to display from the other page, it'll always display them when the progress bar reaches 100% if you get me. How can I do it? $(function() { $(".button").click(function() { URL = $(".URL").val(); $("#flash").slideDown("slow").html('<span class="loading">loading</span>'); $.ajax({ type: "POST", url: "usercp/updateusers.php", data: {url: URL}, cache: false, success: function(html){ $("#results").prepend(html); $("#results").slideDown("slow"); document.getElementById('memb').value=''; document.getElementById('memb').focus(); $("#flash").hide(); } }); return false; }); }); Quote Link to comment Share on other sites More sharing options...
TeddyKiller Posted May 13, 2010 Author Share Posted May 13, 2010 Note: In the PHP File, we have a script that displays some usernames. Though with our method, it displays all the usernames at once, instead of one at a time. Can this be changed so that it does display 1 by 1.. instead of the ajax waiting until all is completed, and then display. The progress bar should display and load etc.. until the last username has been done. 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.