Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to close a jquery modal dialog and refresh parent page

Tags:

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 :)

like image 914
carrot Avatar asked Jan 26 '10 10:01

carrot


1 Answers

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

location.reload(true);
like image 167
Kobi Avatar answered Oct 11 '22 15:10

Kobi