Hola a todos:
Tengo un código php que debería mostrar un mensaje, en el caso de ke se haya enviado un formulario, y otro mensaje en caso contrario.
El Código php es el siguiente:
<?php
if(isset($_FILES['file'])){
copy($HTTP_POST_FILES['file']['tmp_name'], "../videopruebaborrame.flv");
echo '<script>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" ONsubmit="document.getElementById('pp').style.disp lay='block'">
<input type="file" name="file" />
<input type="submit" name="Submit" value="Submit" />
<div id="pp" style="width:250px; height:45px; color:#CCC; display:none">Cargando...<img src="cargando.gif" /></div>
</form>
</body>
</html>
El caso es que si muestra el mensaje 'cargando', pero no el de 'Proceso finalizado' al acabar.
Alguien cree tener una solución?
Muchas gracias!