Refresh another window

From a browser window, I can launch a link using open.window.  This new popup isn't exactly a parent/child relationship though I will consider that it is in this question.  It's not a modal window.  In this popup, a form is filled in and a save button will write to a database and close the window.  The "parent" window should then show an icon on the page indicating that it's popup work was done.  I have this icon work complete but the issue is that the "parent" needs to be refreshed in order for this icon to display (the icon is displayed by reading from the database).

How would I trigger this "parent" page refresh after the "child" window save button was clicked?  Should some reference be sent via the open.window command that can then be used to refresh the caller (parent) page?
mock5cAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mukesh YadavFull Stack DeveloperCommented:
childWindow.location.reload();

Open in new window


Here childWindow is the reference to window.open.
mock5cAuthor Commented:
What I need to know is the reference to the parent, not the child.  The parent page is open.  From there, a window.open link is launched so now I have two windows open, the parent window and the popup child window.  After a save event occurs on the child page, the child window will close and now the parent window is the only one open.  But the parent window needs to be refreshed in order to reload data from the database (in order to update an icon and information on the page).
hieloCommented:
Try:
/* true  forces a reload from the server.  If you use false or if you omit it, the "parent" window is refreshed from cache */
window.opener.location.reload(true);
mock5cAuthor Commented:
I have come to the realization that if I were to reload the parent page, then yes, the icon would show up since it's reading from the updated database.  However, suppose the parent page had controls such as text fields, checkboxes, comboboxes with values that were set.  On this parent page is the link to launch the popup window, which has a save button.  If saving the child window reloads the parent page to display the icon, this would reset the values for all of the fields on the parent form, am I correct?  That would not be ideal.  How would I go about having only the icon on the parent page be refreshed but leave all other fields on the parent page untouched so their values are not reset?
hieloCommented:
It's difficult to help you without looking at the markup of your pages but if you can get this to work:
window.opener.location.reload(true);

then that means that you do have parent-child window relationship, and from the child window you should be able to access elements within the parent window.  EX: if your parent window has:
<img id="icon" src="..."/>

Open in new window


then from the child window you should be able to manipulate the <img/> using:
window.opener.document.getElementById('icon').src='here_put_new_url_for_icon';

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.