|
Posted by Noozer on 06/01/05 19:16
Hi!
I'm trying to use an ASP based upload object on a webpage. If I specify an
encoding type I cannot retrieve other values on the form. If I remove '
encType="multipart/form-data" ' then the values work as expected, but the
upload object fails. The javascript at the bottom of this message is the
code that submits the form, but the result is the same if I click the submit
button myself. Removing the "display:none;" styling doesn't change the
behavior either.
The ASP code that I am using to upload is located here:
http://www.asp101.com/articles/jacob/scriptupload.asp
-- Code snippets -----
<% 'ASP to read the form values. Also tried request.form("Key"). Located
before <head>
Key = request("Key")
Name= request("Name")
%>
<!-- Within Body -->
<form name="actionForm" id="actionForm" method="POST" action="subEdit.asp"
style="display: none;" encType="multipart/form-data">
<input type="text" name="Key" id="Key" value="">
<input type="text" name="Name" id="Name" value="">
<input type="file" name="file1" id="file1">
<input type="submit" name="submit" id="submit" value="submit">
</form>
//Load page with selected agent
function getAgent(key) {
document.forms("actionForm").reset();
document.forms("actionForm").Key.value = key;
document.forms("actionForm").submit();
}
How can I retrieve these values AND allow the upload object to function?
Navigation:
[Reply to this message]
|