Reputation: 921
I am trying to reload the Parent page from child page on save. I am using the below code to refresh it.
window.parent.opener.location.reload(true);
This code is working fine for the first time I save the child record. But if i am staying on the same child page and modified something on the page then saving the record. now i am getting the error as Permission denied.
This error is coming because, in the code "window.parent.opener.location.reload(true)" is not able to find location value.
the location value is coming as {...}.
Any help is appreciable.
Upvotes: 0
Views: 590
Reputation: 548
Once the opener is refreshed the child handle is void. To get around this you need a stable none refreshing opener or parent.
If the parent window also has an opener or it’s an iframe that has a stable parent you can use it to hold reference to the first and second level windows. i.e. Opener 1 / Parent 1 (none refreshing) -> Opener 2 (your parent) -> Child window (CRM form)
After each window is reloaded / refreshed you can go back to Opener 1 to re-connect with your windows.
Upvotes: 0