RE: [PHP] POST form File Upload Progress Bar?
| From: | Alok K. Dhir | Date: | Wed, 17 Apr 2002 04:08:40 +0000 |
| Subject: | RE: [PHP] POST form File Upload Progress Bar? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-93287@lists.php.net to get a copy of this message | ||
Here's a quick-and-dirty working example:
---------------
<script language="Javascript">
var waitwin;
function openWaitWin() {
waitwin=window.open("wait.html","wait_window","width=250,height=220,menu
bar=no,statusbar=no,toolbar=no");
}
function closeWaitWin() {
if (waitwin!=null) {
waitwin.close();
}
}
</script>
<body onunload='closeWaitWin()'>
<form method=post enctype="multipart/form-data" action="myaction.php">
<input type="file" name="test">
<br>
<input type="submit" value="go" onclick='openWaitWin()'>
---------------
> -----Original Message-----
> From:
> php-general-return-93284-adhir=govshops.com@lists.php.net
> [mailto:php-general-return-93284-adhir=govshops.com@lists.php.
net] On Behalf Of CompMan86
> Sent: Tuesday, April 16, 2002 11:23 PM
> To: php-general@lists.php.net
> Subject: Re: [PHP] POST form File Upload Progress Bar?
>
>
> Hi, Thanks for your response =) I don't know much about
> javascript, so if you could show me an example that would be great.
>
> "Weston Houghton" <weslists@anapraxis.com> wrote in message
news:B8E230B7.A9DF%weslists@anapraxis.com...
>
> My cheap trick around this is to have an onClick event on the form
> submit button that brings up a small window with a progress note in
> it, and an animated gif of a prgress bar.
>
> As the page does not unLoad until the upload is finished, I use the
> unLoad event of the body tag to close that progress window.
>
> Generally works really well for me. I can show you an example if you
> like.
>
> Wes
>
>
>
> > I have a POST form with a file upload field. Users will be uploading
> > pictures. What would be the most professional way to tell them their
> > file is uploading and to please wait? Since the action page won't
> > execute until after the image is done uploading, is there a way to
> > have an intermediary
> > page load telling them to please wait, and that page will take the
image
> > and
> > upload it? Or should I just put a note in the upload form warning
them
> > about
> > the long upload times and gray out the submit button with javascript
> > after
> > it's clicked?
> >
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php