carrot
carrot

Reputation: 51

How to close a jquery modal dialog and refresh parent page

i'm not able to close a jquery dialog. Below are my code.

I have a parent page called academic.asp which will open a modal dialog by jquery plug in.

function openPopupDialog(location, windowTitle, heightValue, widthValue) {

    var $dialog = $('#dialogWin').load('submission.asp')
        .dialog({
              autoOpen: false,
              modal: true,
              draggable: false,
              resizable: false,
              title: windowTitle,
              width: widthValue,
              height: heightValue
         });

    $dialog.dialog('open');

    return false;
}

My modal window will load a page "submission.asp"

i will do some submission in my modal window by using ajaxForm as below: paperForm = my form name

How to close the modal and refresh parent page?

Thanks in advance :)

Upvotes: 5

Views: 17256

Answers (1)

Kobi
Kobi

Reputation: 138147

The modal is opened on the same page, so you don't have to close it. Simply reload the page:

location.reload(true);

Upvotes: 5

Related Questions