kendo ui框架多重打开窗口关闭出错问题的解决
kendo ui框架是一款老外搞的支持HTML 5的框架,下载地址在:
www.kendoui.com/,最近团队用它来搞前端,遇到了一个问题,
现在小结如下:
1)创建和修改都在同一个页面,创建和修改时弹出新窗口,当编辑的时候会出现打开过一次编辑页面后第二次打开会出现内容还是加载上一次的。
(没用到ajax去保存或修改的)创建修改新窗口加一个<div/>function newEvent(calId){var winURL = "<%=basePath%>calendar/calendar!input.action"; createevent_window = $("<div />").kendoWindow({actions: ["Refresh", "Maximize", "Minimize", "Close"],animation:false,height: "440px",close: function (e) {this.destroy();},width: "580px",content:winURL }).data("kendoWindow"); createevent_window.center();createevent_window.open();}
function newEvent(calId){a=rand(1000);var winURL = "<%=basePath%>calendar/calendar!input.action"; createevent_window = $("<div id='"+a+"'/>").kendoWindow({actions: ["Refresh", "Maximize", "Minimize", "Close"],animation:false,height: "440px",//close: function (e) {//this.destroy();//},width: "580px",content:winURL }).data("kendoWindow"); createevent_window.center();createevent_window.open();}