Re: [PHP-ES] formulario

From: Webmaster ALPHACOM ( webmaster .en. alphacom.es)
Date: Mon Mar 22 2004 - 12:46:51 CET


Eso lo tienes que hacer con javascript, aunque es recomendable hacer
comprobarlo antes de subirlo.

en javascript seria mas o menos así:
<html>
<head>
<script>
function estalleno(){
if (document.nombre_formulario.archivo.value!=''){
document.nombre_formulario.archivo.disabled=false;
}else{
document.nombre_formulario.archivo.disabled=true;
}
}
</script>
</head>
<body>
<form enctype="multipart/form-data" action="procesar_documentos_ges.php"
method="post" name="nombre_formulario">
 <span class="clase1">INSERTAR DOCUMENTOS </span><br>
 <span class= "titulocapituloCopia">Archivo a enviar:</span>
 <input name="archivo" type="file" onblur="estalleno()"><br><br>
<input type=submit value="Subir archivo" disabled>
</form>
</body>
</html>

Irantzu Leunda Biskarret escribió:

> Hola a tod .en. s, tengo el siguiente formulario para subir archivos a un
> directorio, el caso es que necesito verificar si el cuadro de texto
> está vacío o no antes de enviar el archivo.
>
> El código es el siguiente:
>
> <form enctype="multipart/form-data"
> action="procesar_documentos_ges.php" method="post">
> <span class="clase1">INSERTAR DOCUMENTOS </span><br>
> <span class= "titulocapituloCopia">Archivo a enviar:</span>
> <input name="archivo" type="file"><br><br>
> </form>
>
> INSERTAR DOCUMENTOS
>
> Archivo a enviar:
>
>
>
>
>
>
>
>
>
>
>
> Bien, necesito que si no seleccionan un archivo a enviar, el botón
> enviar quede inutilizado o no aparezca.
>
> Si hay alguien que sepa, le agradezco me ayude porfa.
> Un saludo
> Irantzu
>

-- 
PHP Spanish Localization Talk Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


This archive was generated by hypermail 2.1.7 : Fri May 14 2004 - 16:04:40 CEST