dwz如何在关闭dialog后刷新之前的页面
时间: 2014-11-24来源:开源中国
前景提要
HDC调试需求开发(15万预算),能者速来!>>> 点击添加链接弹出添加框,连接如下<li><a class="add" href="access_addqx.jsp" target="dialog" rel="firstDialogId" ><span>添加</span></a></li>
弹出的窗口如下:

点击保存之后,关闭弹窗,那么问题来了,关闭弹窗之后,怎么刷新之前的页面呢?
添加表单的代码: <form method="post" action="addFile.action" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">




js代码: function dialogAjaxDone(json){ DWZ.ajaxDone(json); if (json.statusCode == DWZ.statusCode.ok){ if (json.navTabId){ navTab.reload(json.forwardUrl, {navTabId: json.navTabId}); } else if (json.rel) { var $pagerForm = $("#pagerForm", navTab.getCurrentPanel()); var args = $pagerForm.size()>0 ? $pagerForm.serializeArray() : {} navTabPageBreak(args, json.rel); } if ("closeCurrent" == json.callbackType) { $.pdialog.closeCurrent(); } } } function navTabPageBreak(args, rel) { dwzPageBreak({ targetType : "navTab", rel : rel, data : args }); } function dwzPageBreak(options) { var op = $.extend({ targetType : "navTab", rel : "", data : { pageNum : "", numPerPage : "", orderField : "", orderDirection : "" }, callback : null }, options); var $parent = op.targetType == "dialog" ? $.pdialog.getCurrent() : navTab .getCurrentPanel(); if (op.rel) { var $box = $parent.find("#" + op.rel); var form = _getPagerForm($box, op.data); if (form) { $box.ajaxUrl({ type : "POST", url : $(form).attr("action"), data : $(form).serializeArray(), callback : function() { $box.find("[layoutH]").layoutH(); } }); } } else { var form = _getPagerForm($parent, op.data); var params = $(form).serializeArray(); if (op.targetType == "dialog") { if (form) $.pdialog.reload($(form).attr("action"), { data : params, callback : op.callback }); } else { if (form) navTab.reload($(form).attr("action"), { data : params, callback : op.callback }); } } }



服务端返回的代码:"{\"statusCode\":\"200\", \"message\":\"" + msg+ "\"," + "\"navTabId\":\"firstDialogId\", \"rel\":\"firstDialogId\", \"callbackType\":\"closeCurrent\",\"forwardUrl\":\""+ url + "\"}"



求大神帮忙解答,万分感谢!





科技资讯:

科技学院:

科技百科:

科技书籍:

网站大全:

软件大全:

热门排行