robcrozier Posted September 21, 2007 Share Posted September 21, 2007 Hi, i want to add a basic progress bar into my website when a user uploads an image. Just so they don't think that the website has died on them whilst the image is uploading. Can anyone help me with a very basic solution? Cheers! Quote Link to comment https://forums.phpfreaks.com/topic/70148-image-upload-progress/ Share on other sites More sharing options...
redarrow Posted September 21, 2007 Share Posted September 21, 2007 when the user press the button to upload redirect user to a page displaying a nice gif and then re redirect them back to a thank you page. Quote Link to comment https://forums.phpfreaks.com/topic/70148-image-upload-progress/#findComment-352272 Share on other sites More sharing options...
~n[EO]n~ Posted September 21, 2007 Share Posted September 21, 2007 I don't think it can be done with PHP, you must use Ajax for that... Quote Link to comment https://forums.phpfreaks.com/topic/70148-image-upload-progress/#findComment-352276 Share on other sites More sharing options...
robcrozier Posted September 21, 2007 Author Share Posted September 21, 2007 Hi, thanks for that, but how will the page displaying the gif know if the file upload process has completed? Im thinking that i could display a small window on top of the main upload page which displays the gif, they can then see that the website is also still there. Cheers! Quote Link to comment https://forums.phpfreaks.com/topic/70148-image-upload-progress/#findComment-352277 Share on other sites More sharing options...
EagerWolf Posted September 21, 2007 Share Posted September 21, 2007 I had the same problem few days ago.. Solution isn't a progress bar which would show you actual progress.. It can't be done with php... Instead of that I made JS function to submit form and load div. When it's clicked a div layer is shown with nice GIF animation, which imitate a progress bar. Visitors will see that something is going on your website. I think it's pretty nice solution... In my case after submitting new site is loaded and div layer isn't visible anymore. If div layer is still shown in your case.. You should just add another script which will hide layer when this part of code is loaded. Hope it helped. Quote Link to comment https://forums.phpfreaks.com/topic/70148-image-upload-progress/#findComment-352278 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.