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");
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");
Share
Improve this question
edited Dec 29, 2009 at 12:56
Peter Lindqvist
10.2k3 gold badges43 silver badges60 bronze badges
asked Dec 29, 2009 at 12:51
Dejan.SDejan.S
19.1k22 gold badges72 silver badges120 bronze badges
1 Answer
Reset to default 15The jQuery dialog opens on the same page, not in a new window. So simple refresh the current page:
location.reload(true);