Código PHP:
<?php
if(isset($_FILES['file'])){
usleep(10000000);
/*
procesamos el upload (simulamos 1 espera de 10 segundos en este ejemplo usando usleep) y cuando terminamos:
*/
echo '<script>parent.document.getElementById("pp").innerHTML="Proceso finalizado";</script>';
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<form action="<?php echo basename($_SERVER['PHP_SELF']) ?>" method="post" enctype="multipart/form-data" name="form1" id="form1" target="ifr" onsubmit="document.getElementById('pp').style.display='block'">
<input type="file" name="file" />
<input type="submit" name="Submit" value="Submit" /> <div id="pp" style="color:#CCC; display:none">Cargando...</div>
</form>
<div style="visibility:hidden"><iframe name="ifr" src="upload.php" width="1" height="1"></iframe></div>
</body>
</html>