我有一个Javascript函数,该函数带有两个参数并在MVC中调用ActionResult以从弹出模式屏幕返回输入。在我的结果表上,当用户单击特定文档行的帮助按钮时,它将触发此功能以显示弹出窗口,以便用户可以发送电子邮件进行查询。
我尝试了各种方法来初始化打开的对话框,但无法解决此问题。
function enquire(documentId,title){
//$("#resultsTable").showLoading();
$("#resultsTable").ready();
$("#modalContent").dialog("/Home/Enquire", "open",{ propertyId: propertyId, documentId: documentId, title: title }, function () {
$("#modalContent").ready({
title: "Enquire about a document",
modal: true,
autoOpen: true,
height: 630,
width: 600,
open: function (event, ui) {
//$("#resultsTable").hideLoading();
$("#resultsTable").ready();
}
});
});
}
调用此函数时,将引发错误:JavaScript运行时错误:初始化之前无法在对话框上调用方法;尝试调用方法。取消注释showLoading行时的另一个错误是:0x800a01b6-JavaScript运行时错误:对象不支持属性或方法“ showLoading”