[英]Retrieve ajax formData on classic asp page?
I'm sending data with ajax to my asp classic page - with new FormData() and my alert shows [object FormData] so it should be right? 我正在使用ajax将数据发送到我的asp经典页面-使用新的FormData(),并且我的警报显示[object FormData],所以应该正确吗? But Im trying to display the variables "folderName" from my asp page in my success alert but it is not showing anything.
但是我试图在我的成功警报中显示我的ASP页面中的变量“ folderName”,但未显示任何内容。
So how do I receive the formData on my asp page? 那么如何在ASP页面上接收formData?
This is what I have now 这就是我现在所拥有的
var formData = new FormData($$(page.container).find('#pdffile')[0]);
formData.append("folderName", "manmade");
myApp.alert(formData); //this shows [object FormData]
$$.ajax({
method: 'POST',
url: 'dokument/dokument2.asp',
//processData: false,
//contentType: false,
enctype: 'multipart/form-data',
data: formData,
success: function (data) {
myApp.alert(data)//I get nothing in the alert?
}
});
return false;
});
and in my asp page I just use request.form!? 在我的ASP页面中,我只使用request.form !?
<%
folderName = request.form("folderName")
%>
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<%=folderName%>
</body>
</html>
I don't know why I can´t receive the variable on my asp page? 我不知道为什么我无法在asp页面上收到变量? Any input really appreciated, thanks.
任何输入都非常感谢,谢谢。
try this for second asp file 试试这个第二个asp文件
<%
folderName = request.form("folderName")
%>
<%= folderName%>
line with 符合
enctype: 'multipart/form-data'
in first file have to be removed. 第一个文件中的必须删除。 You can not access multipart/form-data from asp without special libs...
如果没有特殊的库,则无法从asp访问multipart / form-data。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.