In my system I have a main page, that when clicking on any element on that page a new page is opened, in some cases (button click on child page) from the child page will be open a new page, and so on… when I decide to close any child I need to close all levels to the top and refresh the top level page because on the child level I’m doing Database manipulations and I need to see them when I am returning to the main page.
Every thing is working great, the only problem is with the refresh of the first page!
I’ve tried doing onunload… in the last child…and I’ve tried JQuery focus for the page itself….
Any one have any idea please?
Some code:
1) this is in the top parent page:
$(document).live(
'focus',
function()
{
window.location.reload(true);
}
);
2) this is in the last child (the one that the top parent page calls):
<body class="RTL" onunload = "opener.close()">
And I’ve tried many variations of that….
If any one have any idea it will help a lot, because as for now I need to do Setinterval() and refresh the main page all the time and this is really not nice….
Consider using iframes to show the child pages. That way, the child can use
window.parent.reload()to reload the page.If that is not possible: Did you check that
openeractually contains the correct window? It might be the second-last child instead.