我在 jquery 选项卡中使用 uploadify 插件,效果很好。上传完成后,在uploadify中,我正在发送电子邮件:
$('#file_upload').uploadify({
'fileTypeDesc': 'Image Files',
'fileTypeExts': '*.gif; *.jpg',
'swf': 'Scripts/Uploadify/uploadify.swf',
'uploader': 'FileUploadHandler.ashx',
'cancelImg': 'Scripts/Uploadify/uploadify-cancel.png',
'buttonText': 'Browse',
'onQueueComplete': function (queueData) {
senEmail();
}
});
我的sendEmail
功能在Ready function
以下页面中:
var senEmail = function() {
var notes = $("#<%=txtMessage.UniqueID%>");
var msgbox = $("#cerror");
$("#cerror").hide();
$.ajax({
type: "POST",
url: "ContactMe.aspx/SendEmail",
data: "{'message': '" + notes.val() + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
if (msg.d == 'Sent') {
var $tabs = $('#tabs').tabs(); // declare the tabs
$tabs.tabs("url", 5, "/ContactConfirmation.aspx"); // change the URL of the selected tab
$tabs.tabs("select", 5 + 1); // refresh the tab content
alert("masTEST3");
$tabs.tabs("select", 5 ); // refresh the tab content
alert("endTEST");
}
else {
$("#cerror").show();
msgbox.html(msg.d);
}
}
});
};
现在上面的工作正常,就像发送电子邮件一样,但是当我将用户转发到确认页面时,我收到 jquery 错误:Object Expected
并且不会转发到同一选项卡上的下一页(这适用于其他页面)。
感谢你的帮助。
编辑:::
这是 IE9 错误:
SCRIPT5007: Object expected
jquery-1.8.3.min.js, line 2 character 24275
并且调试器在这一行:
return!t||t!==!0&&e.getAttribute("classid")===t}})