PDA

View Full Version : Progress bar on file upload



sheff
05-12-2005, 03:52 PM
I have a PHP file upload script which is kicked off from an html form and would like to show your progress bar when the visitors click "submit" until the PHP upload is complete. How can I kick off the progress bar script when they click "submit"? It can open a new windo necessary, as long as it closes when the upload is done, which displays a "success" page.

Franko

sheff
05-12-2005, 03:54 PM
It can open a new window if necessary, as long as it closes when the uplaod is done.

cr3ative
05-12-2005, 07:17 PM
www.google.com it.

http://www.raditha.com/php/progress.php

cr3ative

sheff
05-12-2005, 08:17 PM
I'm getting closer. I think I've got it figured out that I have to start it out and put a "bar1.hideBar" in the actionString field after 1 cycle then do a "bar1.showBar" onClick of the submit button. But, when I show it onClick, it hides itself again after 1 cycle. Wouldn't it be better to allow you to start out hidden after 0 cycles? I've been playing with bar1.togglePause() too but can't get that to work right either.

Here is my entire form as it stands right now:

<form action="http://www.cliveparkes.com/cgi-bin/upload.cgi" method="post" enctype="multipart/form-data">

&nbsp; &nbsp; &nbsp <input type="File" name="FILE1" size=40>
<p>
&nbsp; &nbsp; &nbsp <INPUT NAME="company_name" TYPE="text" SIZE="40"> Company Name
<p>
<center>
<INPUT NAME="Submit" TYPE="submit" VALUE="Submit" onclick="javascript:bar1.showBar()";>

&nbsp; &nbsp; <INPUT NAME="name" TYPE="reset" VALUE="Reset"><p>

<script type="text/javascript">
var bar1= createBar(300,15,'white',1,'black','blue',85,7,0,"bar1.hideBar()");
</script>

</center>
</form>