Link to home
Start Free TrialLog in
Avatar of cpatr
cpatr

asked on

How to reload opener page from popup with Javascript without Refresh message

I need to reload my parent page after saving information on a popup page without the parent page popping up the IE message "page cannot be refreshed without resending information"

I am currently using

opener.location.reload(1)

Is there another way?  Thanks
Avatar of CJ_S
CJ_S
Flag of Netherlands image

Using reload it acts like a refresh. You can get around that using something like

window.opener.location.replace(window.opener.location.href + "?" + math.random());

Math.random()

typo. The m is a capital M.
Avatar of cpatr
cpatr

ASKER

that gets rid of the pop up, but it does not repost the data that page was receiving.  I should have mentioned that in my original question.  Sorry
ASKER CERTIFIED SOLUTION
Avatar of CJ_S
CJ_S
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Unless you can use the GET method instead of the POST method. Depending on the data you sent of course.
Avatar of cpatr

ASKER

ok, thank you for your effort.  I will just have to pass all my data to the pop up and pass it back.  I was just trying to avoid the overhead.
Message "page cannot be refreshed without resending information" appears because you send  previosly some information to that page via post method so you must resend it if you want to reload the page.

Try doing just like this and see what you are getting
(code gose instead reload() line)

opener.location.href = opener.location.href

or eventually

var h = opener.location.href
if (h.match("?") h +="&"
  else h+="?"
h+="just=change"
opener.location.href = h
Avatar of cpatr

ASKER

I've tried that, it hasn't worked for me....