ciao a tutti,
non riesco a capire perchè non ne vuole sapere di funzionare....
codice:<html> <head> <title>VERIFICA ESTENSIONE</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script> function estensione(form) { var f=document.getElementById("frm" + form).value; var um = f.elements["img1"].value; var pezzi = um.split(/[\\\/]/); var nom_est = pezzi[pezzi.length-1].split(/\./); if(nom_est[1] != "pdf" && nom_est[1] != "zip") { window.alert("ATTENZIONE IL FILE CHE SI STA' CERCANDO DI CARICARE NON E' VALIDO"); f.reset(); }else{ pezzi[pezzi.length-1] = pezzi[pezzi.length-1].toUpperCase(); f.hiddenField.value = "../public/"+nom_est[0]+"."+nom_est[1]; } } </script> </head> <body> <form action="" method="post" name="frm12" id="frm12"> SOSTITUISCI IL FILE: <input name="img1" type="file" class="questo_input3" id="img1" onChange="estensione(12)"> <input type="text" name="hiddenField"> </form> </body> </html>grazie