我在MVC一個對話框,打開了第一次,但不是第二次,這讓我的對象不支持方法對話框MVC3對話框無法重新
這是我的代碼中的錯誤:
<script src="<%= Url.Content("~/Scripts/jquery-1.5.2.min.js") %>" type="text/javascript"></script>
<script src="<%= Url.Content("~/Scripts/jquery-ui-1.8.11.min.js") %>" type="text/javascript"></script>
$('.trigger').live('click', function (event) {
var id = $(this).attr('rel');
var dialogBox = $("<div>");
$(dialogBox).dialog({
autoOpen: false,
resizable: true,
title: 'Test Modal Dialog',
modal: true,
width: 'auto',
closeOnEscape: true,
show: "slide",
open: function (event, ui) {
$(this).load('<%=Url.Action("TabExample2","RQA")%>');
},
overlay: { backgroundColor: "#000", opacity: 0.5 }
});
$(dialogBox).dialog('open');
});
模態對話框
上爲什麼發生這種情況有什麼建議?
這可能只是你如何粘貼代碼,但你應該有你的周圍的javascript腳本標記。 –
好的我找到了什麼導致這個,但沒有解決方案,原因是對話框正在加載包含jquery選項卡的視圖/頁面,以創建此我引用jquery ui從該頁面中的腳本,並導致'對象不支持方法'對話'「錯誤...現在我的問題(希望有人知道)我如何分開模式對話框參考來解決這個問題...先謝謝了 – Sue