Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

refresh parent page from jquery dialog

I want to refresh the parent page when I close my jQuery dialog.

this is the code I use for my dialog. I tried top.opener.location but it did not do nothing but put me on top of the page.

$("#dialog").dialog({ 
    height: 700, 
    width: 600, 
    closeOnEscape: true, 
    title: 'View', 
    close: function(event, ui){ 
        top.opener.location.reload(true); 
    }
}).dialog("open");
like image 220
Dejan.S Avatar asked Dec 29 '09 12:12

Dejan.S


1 Answers

The jQuery dialog opens on the same page, not in a new window. So simple refresh the current page:

location.reload(true);
like image 89
Kobi Avatar answered Nov 04 '22 13:11

Kobi