刷新jQuery UI的父对话框

人气:253 发布:2022-09-11 标签: php ajax dialog jquery-ui

问题描述

所有,

当我点击网页上的链接,一个jQuery用户界面对话框打开并加载一些Ajax的内容进去。如果我点击这个对话框中的链接,它开辟了一个子对话框。当我点击子对话框中的确定后,我希望孩子对话框,关闭并刷新父对话框中的Ajax内容。

When I click a link on a web page, a JQuery UI Dialog opens up and it loads some ajax content into it. If I click a link inside this dialog, it opens up a child dialog. When I click "OK" in the child dialog, I want the child dialog to close and refresh the ajax content in the parent dialog.

推荐答案

您是否已经拥有了code表示关闭子对话框?它是一个警报()调用?如果是这样,只需添加一个

Do you already have the code that closes the child dialog ? Is it an alert() call ? If so, simply add a

        location.reload();

后报警电话。如果这件事情更复杂的像一个链接,请尝试

after the alert call. If it's something more complicated like a link, try

$('a.link-that-closes-dialog').click(function(){
  //Code to close the dialog
  location.reload();
 });

779