PDA

View Full Version : error reloading another window with javascript



martincrumlish
Sep 4th, 2003, 05:20 PM
Hi,

I have a window that generates a popup. In the popup a link takes you to a second page within the popup.In the 2nd page of the popup I have the following code



<body onUnload="opener.location.replace(window.opener.location);">


This reloads the original parent window. This reloads the page but is causing the problems, the page seems to change but it is going to this URL

http://www.mysitehere.com/[object]

It should refresh the page but instead it is adding the [object] piece to the end.

Do you have any idea's on how to fix this (or an alternative)?

Thanks in advance,

Martin

cheesebag
Sep 4th, 2003, 05:45 PM
Haven't seen that one; perhaps the location object isn't returning a string url (as it normally does).
Maybe:

<body onUnload="opener.location.replace(opener.location.href);">