le due pagine del mio upload sono queste:
che script inserisco per far si che dopo premuto il tasto INVIO mi esca una scritta (in una pagina di "attesa") loading o un testo con scritto "attendere..."?
form.asp:
codice:<html> <head> <title>Upload immagini</title> <link rel="stylesheet" href="../include/ecommerce.css"> </head> <body bgcolor="#EFEFEF"> <center> <form method="POST" enctype="multipart/form-data" action="upload.asp" style="background-color: #EFEFEF; color: #0000FF"> <input type="hidden" name="azione" value="upload"> <table border="0" width="500" cellspacing="0"> <tr> <td align="center" bgcolor="#000080"> <table border="0" width="500" bgcolor="#FFFFEC" cellspacing="0" cellpadding="0" height="132"> <tr> <td width="100%" colspan="2" align="center" height="42">Carica immagini gif dal tuo PC al tuo negozio.</td> </tr> </center> <tr> <td width="80" align="center" height="25"> <p align="right">File:</p> </td> <center> <td width="300" height="25"><input type="file" name="blob" size="40"></td> </tr> <tr> <td width="100%" colspan="2" align="center" height="65"> <input type="submit" name="enter" value=" Invio "> </td> </tr> </table> </center> </td> </tr> </table> </form> </body> </html>
upload.asp:
codice:<% Response.Expires = 0 Response.Buffer = TRUE 'Response.Clear %> <% 'Creiamo l'oggetto FileUploader ed assegnamogli il nome Uploader Dim Uploader, File Set Uploader = New FileUploader 'Impostiamo la dimensione max del file in byte Uploader.maxSize = 50000 '50kb 'Impostiamo il tipo di file ammessi Uploader.fileExt = "jpg, gif, btm" 'Iniziamo il processo di upload Uploader.Upload() 'Visualizziamo i file caricati %> <html> <head> <title>Upload immagini</title> <link rel="stylesheet" href="../include/ecommerce.css"> </head> <body bgcolor="#EFEFEF"> <center> <form action="form_upload.asp"> <table border="0" width="500" bgcolor="#000080" cellspacing="1" cellpadding="0"> <tr> <td width="100%"> <table border="0" width="100%" bgcolor="#FFFFEC" cellspacing="0" cellpadding="0" height="234"> <tr> <td width="100%" height="37"> <p align="center">File jpg caricati.</p> </td> </tr> <% strPath = Server.MapPath("\public\negozio") & "\" 'Controlliamo se sono stati inviati dei file If Uploader.Files.Count = 0 Then %> <tr> <td width="100%" height="18"><font color="#000080" size="2" face="Tahoma">Nome file:Nessun file inviato.</font></td> </tr> <% If Uploader.Error Then %> <tr> <td width="100%" height="18"><font color="#000080" size="2" face="Tahoma">Errore:<%=Uploader.ErrorDesc%></font></td> </tr> <% End If Else 'Ciclo tra i file inviati For Each File In Uploader.Files.Items 'Salvo il file File.SaveToDisk strPath 'Mostriamo i dettagli dei file salvati %> <tr> <td width="100%" height="18"><font color="#000080" size="2" face="Tahoma">Nome file:<%=File.FileName%></font></td> </tr> <tr> <td width="100%" height="18"><font color="#000080" size="2" face="Tahoma">Dimensioni:<%=File.FileSize%>byte</font></td> </tr> <tr> <td width="100%" height="18"><font color="#000080" size="2" face="Tahoma">Tipo:<%=File.ContentType%></font></td> </tr> <% Next End If %> <tr> <td width="100%" height="21"></td> </tr> <tr> <td width="100%" align="center" height="65"><input type="submit" name="enter" value="Carica un altro file"> <p align="center">quando hai finito chiudi questa finestra</p></td> </tr> <tr> <td width="100%" height="21"></td> </tr> </table> </td> </tr> </table> </form> <% Set Uploader = Nothing Dim objFSO, objFolder, objFile Set objFSO = server.createobject("scripting.filesystemobject") Set objFolder = objFSO.getfolder(strpath) For Each objFile in objFolder.Files Response.Write " <font color='#000080' size='2' face='Tahoma'>" & objfile.name & " - " & objFile.DateCreated & " - " Response.Write objfile.size & " byte - " & objfile.type & "</font>" Next set objfolder = Nothing set objfso = nothing %> </center> </body> </html>

Rispondi quotando
