Jump to content

Archived

This topic is now archived and is closed to further replies.

jo.nova

How to display an activity indicator during POST

Recommended Posts

From what I've read, I've gathered that doing a progress bar purely with PHP is pretty much impossible.

I'd like my form (which is used for submitting print-jobs to our print-shop's workflow) to display an interim message or image between the time that the Submit button is hit and the time that the confirmation message is displayed.  Since some large files take a while to upload, right now the customer just sees the form they filled out while their file uploads, with no indication that anything is happening.

Is it possible to do something like:

While (form data is uploading) {display message}; ???

Any ideas?

Share this post


Link to post
Share on other sites
I don't think it's possible with a server-side script. You could try a client-side script like JavaScript.

Share this post


Link to post
Share on other sites
I found a sweet article on this topic at:

http://www.gen-x-design.com/archives/ajax-activity-indicators-make-them-global-and-unobtrusive/1/

Seems to be just what I'm looking for. Now I've gotta figure the damn thing out!

Share this post


Link to post
Share on other sites
yeah, i was going to say that you shoud look towards ajax for this, ive been trying to find out more about it and it seems ideal for this this sort of thing.

Share this post


Link to post
Share on other sites
I was going to suggest doing it in flash since it supports PHP scripting in it and such...

Share this post


Link to post
Share on other sites
Try these:
http://www.raditha.com/php/progress.php
or
http://pdoru.from.ro/
or
http://www.devpro.it/upload_progress/

Share this post


Link to post
Share on other sites
::Chuckles::  :D

Shogun, I looked at every one of those yesterday!  They're cool, but not what I'm looking for.  Thanks, though!

pixy,  I'd love to do it in Flash.....except I am completely bewildered by action scripts at this point. Isn't everbody?  ;D Wish I DID know flash, though.  Maybe someday I'll dig in.

Share this post


Link to post
Share on other sites
www.pixel2life.com has loads of VERY helpful flash tutorials. Thats where I learn everything from. :D

Share this post


Link to post
Share on other sites
i think you'd be well off looking into AJAX for this, since it's fairly simple to implement if you have the patience to understand the basis behind AJAX.  furthermore, after getting a basic grounding in AJAX, an entire world of options opens up.

try following the introductory tutorial at [url=http://www.ajaxfreaks.com]www.ajaxfreaks.com[/url] (pardon the blatant in-promotion), and then have a look on google for "AJAX".  apple.com in particular has a decent run-down of it.  it helps to know a little bit about javascript.

it's simple - run the form's POST request to your file upload script, and while the server is processing it, display an "uploading.." message or image into a previously hidden DIV.  get a good grasp on the basics and you'll find it's fairly easy from there.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.