【发布时间】:2014-06-11 13:22:17
【问题描述】:
我有一个母版页,其中包含以下 css/js:
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link rel="stylesheet" type="text/css" href="resources/css/jquery-ui.css">
这是我用来打开弹出窗口的函数,我传递了一些参数来加载弹出窗口。
function planDataInputPopup(dialogId, formID, actionName, popHeight, popWidth, paramData) {
$(dialogId).dialog({
autoOpen : true,width : popWidth,modal : true,dialogClass: 'no-close',
draggable: true, resizable: true, position: [306,105],
buttons : {
"Create" : function() {
if(document.getElementById("dropDownCounter").value != null){
document.getElementById("dropDownCounter").value=dropDownCounter+1;
}
document.getElementById("inputPopupMode").value=true;
if(paramData == 'false'){
submitInputFormUsingAjax(formID,actionName,"#inputFormMainDiv");
}else{
submitMultipartFormUsingAjax(formID,actionName,"#inputFormMainDiv");
}
$(this).dialog("close");
$(this).remove();
//$(this).dialog("destroy");
},
Cancel : function() {
$(this).dialog("close");
$(this).remove();
//$(this).dialog("destroy");
return false;
}
},
close : function() {
$(this).dialog("close");
$(this).remove();
//$(this).dialog("destroy");
}
}); }
以上代码在本地运行良好,但是当我部署在开发服务器上时,我收到异常 TypeError: $(...).dialog is not a function 或有时出现“$(this).dialog("destroy")”;
对话框应该关闭,但它没有在开发服务器上发生。
我没有得到什么错误。
任何帮助将不胜感激。
【问题讨论】:
标签: javascript jquery html jquery-ui