我的页面上有一个使用 JQuery Dialog Widget 制作的对话框。我已经设置了两个按钮,使其具有单击页面上不同按钮的功能,这些按钮将触发页面的回发并执行各种操作。当对话框为modal: false时,对话框会执行相关的clickButton函数,然而,当我设置modal: true时,按钮不会被点击,虽然该函数被输入了。
我想我错过了关于执行与按钮相关的功能的modal: true的一些内容。
下面是我的javasript
function displayQuoteToCashMessage() {
//this is where we do that alert for the QuoteToCash request stuff
$("#<%=divQuoteToCashAlert.ClientId %>").show();
$("#<%=divQuoteToCashAlert.ClientId %>").dialog({
modal: false,
resizable: false,
buttons: {
"Ok": function () {
//save confirmations
clickButton(true);
$(this).dialog("close");
},
"No": function() {
clickButton(false);
$(this).dialog("close");
}
}
});
}
function clickButton(b) {
//do something with b
document.getElementById(btnSave).click()
};