l0ve2hat3 Posted March 14, 2008 Share Posted March 14, 2008 i have a progress bar but it echos the percent after the loop is done. is there anyway to make it update as the progress updates?? <? $i=0; while($i < 100){ $i++; usleep(50000); echo "||"; flush(); ob_flush(); } echo "<br>".$i."%"; ?> Quote Link to comment Share on other sites More sharing options...
soycharliente Posted March 14, 2008 Share Posted March 14, 2008 I've tried doing that with PHP as well and I could never get it working either. I ended up using Javascript with no progress bar if they didn't have JS enabled. Because AFAIK, PHP will run completely before returning information to the browser for rendering. Quote Link to comment Share on other sites More sharing options...
l0ve2hat3 Posted March 14, 2008 Author Share Posted March 14, 2008 thanks Quote Link to comment Share on other sites More sharing options...
l0ve2hat3 Posted March 14, 2008 Author Share Posted March 14, 2008 actually how could i do it with javascript? or should i ask in another forum Quote Link to comment Share on other sites More sharing options...
soycharliente Posted March 14, 2008 Share Posted March 14, 2008 I lied actually. I did make it work with PHP. Where can I attach a file at? Quote Link to comment Share on other sites More sharing options...
derrick1123 Posted March 14, 2008 Share Posted March 14, 2008 I think you should ask on the other forum, you will probably get good results with people who know a little bit more about javascript than people who are here that would only know a little about javascript and a lot about PHP. (in which this is my case lol ) BTW, ajax would seem the way to go in your situation. Quote Link to comment Share on other sites More sharing options...
soycharliente Posted March 14, 2008 Share Posted March 14, 2008 I made it work in PHP. I have code. I PM'd you love2hate. Quote Link to comment Share on other sites More sharing options...
l0ve2hat3 Posted March 14, 2008 Author Share Posted March 14, 2008 thank you! 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.