Reputation: 352
How do we reload parent's parent in JavaScript?
I tried the following code but it didn't seem to work:
<script>
function closeOnRejectSuccess(){
window.opener.parent.location.reload();
}
</script>
Upvotes: 1
Views: 1312
Reputation: 172458
Yuo may try this:
function closeOnRejectSuccess(){
window.opener.opener.location.reload();
}
Upvotes: 3
Reputation: 1074435
It depends on what the relationship is, either what you have (if your opener is a frame) or
window.opener.opener.location.reload();
// ^^^^^^^
...if it's also been opened.
Upvotes: 1