Classic ASP bekommen textbox-Wert mit VBScript
Ich versuche zum hochladen einer Datei auf meinem server. Die Datei hochladen aber ich möchte den Wert in das Textfeld Datei1. Ich möchte NICHT das Weg, ich will nur die Dateinamen, auf die ich Spare.
<html>
<head>
<title>File Upload</title>
</head>
<body>
<form name="uploadr" method="post" action="" enctype="multipart/form-data">
File 1 : <input name="File1" type="file"/><br/><br/>
<input name="btnSubmit" type="submit" value="Upload files >>" /><br/>
<input name="hiddenVal" type="hidden" value="testVal" />
</form>
</body>
</html>
Ich habe Folgendes VBScript:
<%
Server.ScriptTimeout = 2000
Form.SizeLimit = &H100000
If Form.State = 0 Then 'Completed
Form.Files.Save DestinationPath
response.write "<br><Font Color=green>File (" & Form.TotalBytes \1024 & "kB) was saved to " & DestinationPath & " folder.</Font>"
response.write(document.uploadr.hiddenVal.value())
ElseIf Form.State > 10 then
Const fsSizeLimit = &HD
Select case Form.State
case fsSizeLimit: response.write "<br><Font Color=red>Source form size (" & Form.TotalBytes & "B) exceeds form limit (" & Form.SizeLimit & "B)</Font><br>"
case else response.write "<br><Font Color=red>Some form error.</Font><br>"
end Select
End If'Form.State = 0 then
%>
Wenn es um den response.write(document.uploadr.hiddenVal.value())
es sagt, 'Document' variable nicht definiert.
Was muss ich tun, um den Wert der textbox?
InformationsquelleAutor webdad3 | 2011-09-07
Du musst angemeldet sein, um einen Kommentar abzugeben.
Versuchen Sie dies:
response.write(UploadFormRequest("hiddenVal"))
InformationsquelleAutor PaulStock