PDA

View Full Version : Parent window issue


aluminumpork
03-07-2006, 09:14 PM
I'm popping up a window with:



var newWindow = window.open('page.html','','width=400,height=400');



I then have to manipulate stuff on the original page. I'm using:


parent.whatever


to do so. But for some reason the newly popped up window is referring to itself when I call parent.

What could cause this?

Here is a working example: http://frostyle.servehttp.com/automanage/test.html

The link opens the new window, and the link on the new window is supposed to write Hello to the parent. But writes it to itself.

Kravvitz
03-07-2006, 11:15 PM
"parent" is used when dealing with frames and iframes.
"window.opener" is used when dealing with popup windows.

http://www.quirksmode.org/js/croswin.html

aluminumpork
03-08-2006, 02:07 PM
Ya, I figured that out when playing around some more. Thanks for the reply!