PHP Fileupload with gif progress animation


I am using PHP and a simple HTML form to upload images, and I could care less about monitoring the actual progress. I just want an animated gif to cycle while the files upload.

The problem is that the browser causes the gif to stop animating when the file transfers. I have the form targeting an invisible iframe.

What can I do to make the gif keep animating through the file transfer? Is there some iframe combination I can use? I am pretty sure it is possible because in an example I found:

It seems like the gif animates through the transfer. However I was unable to reverse engineer that script.

Ian Williamson

I’ve done it in a popup before (form onsubmit) and it keeps animating, and then use the body onunload event to close it

You could just have somthing like this…

<html xmlns="" xml:lang="en" >


		<script language="javascript">
			function showit()


	<body >
        <div id="loading" style="display:none;padding:20px;">
		   <img src="images/uploading.gif" border="0">

	<form action="includes/upload.php" method="post"
                 enctype="multipart/form-data" name="form1">
		      <input name="userfile" type="file" id="userfile" >
		      <input name="Submit" type="button" id="Submit"
                         value="Submit"  onClick="showit();">


not sure if HTML_Progress can help you…otherwise I like the [URL=]Mega Upload script. Have a look…

That looks like it is causing the form to wait to submit. I want it to submit normally.