Connecting Tech Pros Worldwide Forums | Help | Site Map

Getting window from document

D. Patterson
Guest
 
Posts: n/a
#1: Oct 30 '05
Greetings,

Is there any way to find the window object given the document object?

TIA,
D. Patterson



Martin Honnen
Guest
 
Posts: n/a
#2: Oct 30 '05

re: Getting window from document




D. Patterson wrote:
[color=blue]
> Is there any way to find the window object given the document object?[/color]

IE has document.parentWindow:
<http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/properties/parentwindow.asp>
Opera 8 implements that too, Mozilla does not.
Most W3C DOM Level 2 browsers (like Mozilla or Opera) have
document.defaultView which in those browsers is the window object
(although that is not required or suggested by the W3C DOM).


--

Martin Honnen
http://JavaScript.FAQTs.com/
D. Patterson
Guest
 
Posts: n/a
#3: Oct 31 '05

re: Getting window from document


Thanks a lot!
I looked all over and couldn't find IE's .parentWindow. I've been tearing my
hair out.
Thanks again.

D.

"Martin Honnen" <mahotrash@yahoo.de> wrote in message
news:4364f007$0$21947$9b4e6d93@newsread2.arcor-online.net...[color=blue]
>
>
> D. Patterson wrote:
>[color=green]
> > Is there any way to find the window object given the document object?[/color]
>
> IE has document.parentWindow:
>[/color]
<http://msdn.microsoft.com/library/de...uthor/dhtml/re
ference/properties/parentwindow.asp>[color=blue]
> Opera 8 implements that too, Mozilla does not.
> Most W3C DOM Level 2 browsers (like Mozilla or Opera) have
> document.defaultView which in those browsers is the window object
> (although that is not required or suggested by the W3C DOM).
>
>
> --
>
> Martin Honnen
> http://JavaScript.FAQTs.com/[/color]


Closed Thread