Home >Web Front-end >JS Tutorial >DWZ refresh dialog solution_jquery

DWZ refresh dialog solution_jquery

WBOY
WBOYOriginal
2016-05-16 17:41:121341browse

1. Scene

After clicking a button and deleting a record, it will prompt that the deletion was successful, and then refresh the dialog.

2.Solution

1) Add the callback attribute to the delete button and add the callback function.

Copy code The code is as follows:

Add the following extension code to dwz.dialog.js :
Copy code The code is as follows:

reloadDialog:function(dialogId){
      dialog = $("body").data(dialogId);
if(dialog){
$.pdialog.reload(dialog.data("url"),{dialogId:dialogId});
}
       },

3) Use

function dialogAjax(json){
$.pdialog.reloadDialog("triggerList");
}
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn