This week's book giveaway is in the Programmer Certification forum. We're giving away four copies of OCP Oracle Certified Professional Java SE 21 Developer Study Guide: Exam 1Z0-830 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
I have a problem and I hope someone can help me out here. It goes like this:
I have a page. This page has links which opens up a pop-up window. This pop-up window has a Save button which will do some operation for the user. Once the Save button is clicked, the pop-up will close. Now, I want the parent page (the page which had my links) to reload automatically once the pop-up is closed.
I guess you've got me wrong here. When I cause the pop-up window to close, I must force the parent page to reload. And thus, in the pop-up window, I have included that code.
I tried windo.location.reload(), but what it does is, it reloads the pop-up window before closing it.
The first time I looked at your code I did not see the main problem. You are closing the window before you call the reload function. You must call the reload function, then close the pop up window. If you close the window then the reload statement will not be called.
This should do it... window.opener.reload(); window.close();