uploadify ajax,Uploadify预防未来的Ajax请求
我正在嘗試使用Uploadify進行Ajax文件請求。但是,我遇到了一個非常奇怪的情況。這里是我的代碼:Uploadify預防未來的Ajax請求
$.ajax({
type: "POST",
data: "choice="+choice,
url: "getformdata.php",
cache: false,
async: false,
success: function(msg) {
$(".file-upload").each(function() {
var $p = $(this).parent();
$(this).uploadify({
'swf': 'uploadify.swf',
'uploader': 'uploadify.php',
'fileTypeDesc': '.doc, .docx, or .pdf',
'fileTypeExts' : '*.doc; *.docx; *.pdf',
'onUploadError' : function(file, errorCode, errorMsg, errorString) {
alert('The file ' + file.name + ' could not be uploaded: ' + errorString);
},
'onUploadSuccess' : function(file, data, response) {
$($p).find("input[type='hidden']").val(data);
$($p).find(".file-name span").text(data);
}
});
});
}
});
因為它是目前,如果我試圖讓另一個Ajax請求,PHP不知何故不知道我的任何會話變量。只要我取出.uploadify()方法,它就會再次知道我的會話變量。
這到底是什么原因造成的?有沒有辦法解決它?
總結
以上是生活随笔為你收集整理的uploadify ajax,Uploadify预防未来的Ajax请求的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 非线性视频编辑软件百科全书式介绍
- 下一篇: 金蝶K3常用表信息