Jump to content


Photo

How to display an activity indicator during POST


  • Please log in to reply
9 replies to this topic

#1 jo.nova

jo.nova
  • Members
  • PipPip
  • Member
  • 27 posts

Posted 13 July 2006 - 08:54 PM

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?

#2 dptr1988

dptr1988
  • Members
  • PipPipPip
  • Advanced Member
  • 372 posts

Posted 13 July 2006 - 09:10 PM

I don't think it's possible with a server-side script. You could try a client-side script like JavaScript.
Need more help with your project? One of the thousands of programmers, web designers or artists at <a href="http://www.rentacode...d_6764522">Rent A Coder</a> would be happy to help.

Disclaimer: Free advice is usually worth what you paid for it. ( or at least when it's coming from me! )

#3 jo.nova

jo.nova
  • Members
  • PipPip
  • Member
  • 27 posts

Posted 13 July 2006 - 09:11 PM

Yeah, I kinda figured that.  Any suggestions?

#4 jo.nova

jo.nova
  • Members
  • PipPip
  • Member
  • 27 posts

Posted 13 July 2006 - 09:26 PM

I found a sweet article on this topic at:

http://www.gen-x-des...-unobtrusive/1/

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

#5 GingerRobot

GingerRobot
  • Staff Alumni
  • Advanced Member
  • 4,086 posts
  • LocationUK

Posted 13 July 2006 - 09:29 PM

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.

#6 pixy

pixy
  • Members
  • PipPipPip
  • Advanced Member
  • 295 posts

Posted 13 July 2006 - 09:29 PM

I was going to suggest doing it in flash since it supports PHP scripting in it and such...

This is a .44 Caliber Loveletter straight through my heart.

Tabulas + Threadless + Hire Me!


#7 ShogunWarrior

ShogunWarrior
  • Members
  • PipPipPip
  • Advanced Member
  • 528 posts
  • LocationIreland

Posted 13 July 2006 - 09:39 PM

Try these:
http://www.raditha.c...hp/progress.php
or
http://pdoru.from.ro/
or
http://www.devpro.it/upload_progress/
<a href="http://www.daviddora...nmedia.com/">My New Site/Blog</a> | <a href="http://www.daviddora...m/check/">Check your page for broken links/images/scripts</a>

Zend Certified Engineer
Follow me on Twitter: http://twitter.com/davidd

#8 jo.nova

jo.nova
  • Members
  • PipPip
  • Member
  • 27 posts

Posted 13 July 2006 - 10:00 PM

::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.



#9 pixy

pixy
  • Members
  • PipPipPip
  • Advanced Member
  • 295 posts

Posted 13 July 2006 - 10:10 PM

www.pixel2life.com has loads of VERY helpful flash tutorials. Thats where I learn everything from. :D

This is a .44 Caliber Loveletter straight through my heart.

Tabulas + Threadless + Hire Me!


#10 akitchin

akitchin
  • Staff Alumni
  • Advanced Member
  • 2,516 posts
  • LocationCalgary, AB, Canada

Posted 13 July 2006 - 10:17 PM

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 www.ajaxfreaks.com (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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users