Ver Mensaje Individual
  #2 (permalink)  
Antiguo 27/07/2003, 11:09
Ventureraider
 
Fecha de Ingreso: julio-2003
Mensajes: 3
Antigüedad: 20 años, 8 meses
Puntos: 0
<html>
<head>
<!-- Copiar dentro del tag HEAD -->
<script LANGUAGE="JavaScript">

extArray = new Array(".gif", ".jpg");
function LimitAttach(form, file) {
allowSubmit = false;
if (!file) return;
while (file.indexOf("\\") != -1)
file = file.slice(file.indexOf("\\") + 1);
ext = file.slice(file.indexOf(".")).toLowerCase();
for (var i = 0; i < extArray.length; i++) {
if (extArray[i] == ext) { allowSubmit = true; break; }
}
if (allowSubmit) form.submit();
else
alert("Se permiten únicamente archivos con la extención: "
+ (extArray.join(" ")) + "\nPor favor, seleccione otro archivo "
+ "e intente de nuevo.");
}

</script>
</head>

<body>
<!-- Copiar dentro del tag BODY -->
<form method="post" name="upform" action="cgi-bin/tu-script.cgi"
enctype="multipart/form-data">
<p><input type="file" name="uploadfile"> <input type="button" name="Submit" value="Enviar"
onclick="LimitAttach(this.form, this.form.uploadfile.value)"> </p>
</form>
</body>
</html>


Este codigo esta en ScriptMaster v1.0 y no se como hacer esto: cgi-bin/tu-script.cgi

Alguien me lo explica xD
Gracias