amlan_08 — 2006-08-08T03:19:38-04:00 — #1
Hello, I have facing a problem in refreshing a parent window from a child window. From child window I use
to reload the parent window and it works fine. But the problem is whenever the parent window is refershing the follwoing message come
""The page cannot be refrshed without resending the information. click Retry to send the information again, or click cancel to reutrn to the page that you were trying to view."
Can any tell me how to disable the message?
I also use
window.opener.location = "schedule.php?id=1";
this also works fine. But the problem here is I need to open this child window from varius pages and for that I want make this "schedule.php" page dynamic. But I can't get the parent window url. Is there any option to get the parent window url in child window?
Thanks in advance for helping me.
jimfraser — 2006-08-08T09:18:47-04:00 — #2
window.opener.location.href should contain the url that was called. You can only read this if its in the same domain as the window you are calling it from.
jtrelfa — 2006-08-09T08:19:39-04:00 — #3
I see what you're trying to do. The message you're getting is because the parent window is the result of a form that was POSTED.
If you used GET, that should go away.
If GET doesn't make it go away, then you may need to pass variables back and forth between the parent and child:
var thisURL = "http://example.com/schedule.php?id=1";
opener.location.href = opener.thisURL;
indigobean2003 — 2008-07-02T18:11:24-04:00 — #4
I was able to do this by replacing GET with POST, thanks for the suggestion.