我在PopUpWindow.js文件添加該代碼。在我的腳本文件夾jQuery的對話框彈出窗口問題
var window = "<div id='window' style='display: none;width:190px'></div>";
PopUpWindow = function (titles, message, redirectURL) {
document.getElementById('window').innerHTML = message;
$("#window").dialog({
resizable: true,
height: 180,
title: titles,
width: 500,
modal: false,
open: function() {
$('.ui-widget-overlay').show();
$('.ui-dialog-titlebar-close.ui-corner-all').hide();
},
buttons: {
"OK": function() {
$(this).dialog("close");
if (redirectURL) {
window.location = redirectURL;
}
}
}
});
};
我已經包含了這個js文件中的Site.Master頁。
但我仍然無法在我的任何aspx頁面訪問此PopUpWindow函數?
是我在做什麼worng?
我不能execte這個PopUpWindow用於顯示彈出消息
PopUpWindow("Field to Show","Message","URL redirect");
感謝
謝謝Nexxeus。我提到的代碼是我在我的js文件中的代碼..一切都一樣,但我無法訪問此PopUpWindow對話框? – kumar 2011-03-21 18:01:39
您是否看到我的編輯? – mattsven 2011-03-21 18:04:16
如果我添加Js文件到我的site.master頁面我收到此錯誤在我的頁面錯誤詳細信息 用戶代理:Mozilla/4.0(兼容; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB0.0 ; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MDDR; .NET4.0C; .NET4.0E) Timestamp:Mon,21 Mar 2011 18 :27:44 UTC 消息:對象不支持此屬性或方法 行:5 字符:71822 代碼:0 URI:HTTP://本地主機:50189 /腳本/ MicrosoftAjax.js 消息:「瓦特.document'爲空或不是對象 Line:7 – kumar 2011-03-21 18:28:37