我配置为在ASP.NET站点中的不同按钮单击中在同一页面中显示三个jquery模式对话框 首先,我打开第一个模态对话框并关闭它,它工作正常 然后我打开第二个对话框,它在控制台中显示错误为Uncaught TypeError:$(...)。dialog不是一个函数。 我的代码是:
function opendialog(url, Id) {
var h = $(window).height();
var w = $(window).width();
h = h - (h * 25 / 100);
w = w - (w * 25 / 100);
var jobId = '<%= Request.QueryString["JobId"] %>';
$('#PreviewCV').load('Admin/PreviewCV.aspx?URL=' + url + '&h=' + parseInt(h) + '&w=' + parseInt(w) + '&applicationID=' + Id + '&jobId=' + jobId, function () {
return false;
});
var $dialog = $('#PreviewCV')
.dialog({
autoOpen: false,
modal: false,
height: h,
width: w,
title: 'Preview CV',
beforeClose: function (event, ui) {
$("div#PreviewCV").empty();
},
open: function (type, data) {
},
close: function (type, data) {
}
});
$dialog.dialog("open");
}
function AddNotes(jobApplicationId, candidateId,jobId) {
$('#ContactLog').load('Admin/AddNotes.aspx?CandidateId=' + candidateId + '&JobApplicationId=' + jobApplicationId + '&JobId=' + jobId, function () {
return false;
});
var $dialog1 = $('#ContactLog')
.dialog({
autoOpen: false,
modal: false,
height: 600,
width: 850,
title: 'Add Notes'
});
$dialog1.dialog('open');
}
function openLetterdialog(comment) {
$('#PreviewCoveringLetter').html(comment);
var $dialog2 = $('#PreviewCoveringLetter')
.dialog({
autoOpen: false,
modal: false,
height: 350,
width: 400,
title: 'Preview Covering letter',
open: function (type, data) {
},
close: function (type, data) {
}
});
$dialog2.dialog("open");
}
如何解决这个问题?我在这段代码中做错了什么。
谢谢&amp;问候, 拉莉莎