Raga,
Ho realizzato la seguente pagina che mi permette di effettuare il dowload però non mi reindirizza alla pagina originaria index.asp nonostante il refresh .... ci sta qualche altro modo ?
<%
ID = Request ("ID")
data = Date()
IP=request.servervariables("remote_addr")
FUNCTION FixQuotes( theString )
FixQuotes = REPLACE( theString, "'", "''" )
END FUNCTION
sub conteggio
SQL ="UPDATE location SET "
SQL = SQL & " click = " & FixQuotes(click) & ","
SQL = SQL & " data = '" & FixQuotes(data) & "',"
SQL = SQL & " IP = '" & FixQuotes(IP) & "'"
SQL = SQL & " WHERE IDutente ="& ID &""
conn.Execute(SQL)
'Response.Redirect "location/" & file &""
end sub
Set rs = Server.CreateObject("ADODB.Recordset")
sql = "SELECT * FROM location where IDutente =" & ID &""
rs.open sql, conn, 1, 3
nome = rs("nome")
file = rs("frantoio")
click = rs("click")+1
conteggio
%>
<%
rs.close
set rs = nothing
conn.close
set conn=nothing
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="refresh" content="3; url=index.asp"/>
<title>Download File</title>
<Script type="text/javascript">
<!--
function download(){
location.href="location/<%=file%>";
}
-->
</Script>
</head>
<body onLoad="download()">
</body>
</html>

Rispondi quotando