
06/10/2006, 06:32
|
| | Fecha de Ingreso: julio-2006 Ubicación: sevilla
Mensajes: 251
Antigüedad: 18 años, 8 meses Puntos: 5 | |
siento molestarde nuevo pero no se que hago mal.
function tipo(tel) {
var tamano;
var conti;
var tip= tel.length;
var t=tip-3;
var ex=tel.substr(t,3);
var ruta=document.fcurso.archivo.value;
var aruta=ruta.split("\");
var tam= aruta.length;
if (ex=="rtf" || ex=="odt" || ex=="pdf") {
}else{
alert ("El tipo de archivo no es valido, recuerde solo .rtf , .odt o .pdf ");
document.fcurso.archivo.value="";
return false;
}
tamano=aruta[tam].length;
if (tamano >50) {
alert ("El nombre del archivo tiene más de 50 carácteres.");
document.fcurso.archivo.value="";
return false;
}else{
}
cont=0;
while (cont <= tamano)) {
if (tel.charAt(cont) == " ") {
espacios = false;
}
cont++;
}
if (espacios != false) {
}else{
alert ("El nombre del archivo contiene espacios en blanco. " + ruta);
document.fcurso.archivo.value="";
return false;
}
} |