Monday, 19 August 2013

possible to refresh (not reload) a parent page with javascript?

possible to refresh (not reload) a parent page with javascript?

I have a page that shows images. if a certain record doesn't have an image
associated with it yet, I provide the user with a pop-up window link so
that they can upload an image. When the user submits the form on the
pop-up, it refreshes, uploads the image and then automatically closes.
Before the pop-up closes, i want to refresh (not reload) the parent. The
reason I don't want to reload is because I'm using post data to
dynamically populate the page content. If I reload, all the previous data
is lost. I tried to change window.opener.location.reload(true); to
window.opener.location.refresh(true); ... but apparently that's not a
valid command.
Is there a way to refresh the parent page instead of simply reloading it?

No comments:

Post a Comment