PDA

View Full Version : Blank, Parent, Self Top


Soad
12-12-2005, 05:18 AM
What is the difference between blank, parent,self.top ? I know that blank opens up a new window but what do the others do ?

davidj
12-12-2005, 10:37 AM
self opens page in the same window

parent if you click a link from a blank or popup then page open in the window that you started with. Think of it like this.. when you open a URL, that is the parent window. If you open popups or other windows from the same url they are children of the parent.

TOP if your using frames the TOP is the window that contains the frames

domedia
12-12-2005, 01:41 PM
I always thought _PARENT meant parent frame, while _TOP meant the main window (useful if you have nested frames).

davidj
12-12-2005, 01:47 PM
possibly but i have always used parent.document to target the window which opened the child window. I know it works

there is also opener as in opener.document to target the window which opened the child window

domedia
12-12-2005, 01:51 PM
I though window.opener was the name of the original window in DOM?
I just put one in on a pop-up window on http://www.mackinacparks.com/ ('http://www.mackinacparks.com/') where clicking the popup closes the pop and sends a target to the main window.

davidj
12-12-2005, 02:01 PM
yes of course. which ever window opened the window your editing

main window >>> (opens) >>
child1
child2
child3 >>> (opens) >>

child.child1
child.child2
child.child3



if your working in child.child3 then opener would refer to child3 and parent would refer to main window. This works when dealing with popups or _blank and that the parent is still open. If your using _self to navigate page to page Parent would target its self as the only window open would be the parent (no matter what is loaded in it)

this is my understanding anyway