Ver Mensaje Individual
  #1 (permalink)  
Antiguo 30/06/2010, 12:59
ARNOLDGARCES1994
 
Fecha de Ingreso: julio-2007
Mensajes: 11
Antigüedad: 16 años, 9 meses
Puntos: 0
De acuerdo hacer una progress bar mietras sube un archivo

bueno pues basicamente eso es lo que quiero que en mi pagina aparesca cuando le pongo subir archivo, una barra cargando... y que cuado termine de subir, la barra haya llegado a 100% y l o rre direccione a la pagina donde ya lo termino de subir, no se si me haga entender

este codigo uso para la barra, pero obvio no me sirve, espero me puedan ayudar:

Código Javascript:
Ver original
  1. ]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  3. <head>
  4.     <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
  5.     <meta name="author" content="Jackson666" />
  6.  
  7.     <title>Untitled 2</title>
  8. <style type="text/css">
  9. *{margin: 0;padding: 0;}
  10. #barra{background-color: black; height:20px; position: absolute; left: 0; top: 20px;}
  11. #contenedor{position: relative; margin: auto; height: 60px; width: 100%;}
  12. </style>
  13. </head>
  14. <body>
  15. <div id="contenedor">
  16. <div id="barra"></div>
  17. </div>
  18. <script type="text/javascript">
  19. var x=0;
  20. window.onload=progress();
  21.  
  22. function progress(){
  23.     var timer;
  24.    
  25.     if(x<100){
  26.         x++;
  27.         document.getElementById('barra').style.width=x+'%';            
  28.         timer=setTimeout('progress()',50);
  29.     }else{
  30.         clearTimeout(timer);
  31.         location.href='tuPagina.htm';
  32.     }
  33. }
  34. </script>
  35. </body>
  36. </html>