[Javascript] Enumerating Other Window

David Lovering dlovering at gazos.com
Fri Mar 21 13:00:10 CST 2003


I thought so too, until I did a descending tree analysis.  Apparently, the
window.opener sees as its first object a 'document', much like a 'frame'
does.  Again, to get at the soft and squishy insides you need to punch
through this crust by de-referencing to document.  [I've heard tell that
this is somewhat variable, depending on which version of IE you are running,
and/or whether you are using a Netscape model browser].

If you can wave your magic wand to make this go away, I'll be glad to cheer
the process from the sidelines.

-- Dave Lovering

(BTW -- many of the things inside Microsoft manuals don't work as described.
If you think you've found a case where this convention is broken, try using
a getProps routine to map out the properties associated with a given object
layer.  I guarantee you many hours of fear, loathing, and surprise).

----- Original Message -----
From: "Peter Brunone" <peter at brunone.com>
To: "[JavaScript List]" <javascript at LaTech.edu>
Sent: Friday, March 21, 2003 11:34 AM
Subject: Re: [Javascript] Enumerating Other Window


> Point of parliamentary procedure:  shouldn't
>
> window.opener.parent.document.framename
>
> be
>
> window.opener.parent.framename
>
> ?  I don't think you can get to the frameset through the document
(although with IE 5.5 and above, you can treat iframes as CSS elements).
>
> Cheers,
>
> Peter
>
> ---------- Original Message ----------------------------------
> From: "David Lovering" <dlovering at gazos.com>
> Reply-To: "[JavaScript List]" <javascript at LaTech.edu>
> Date: Fri, 21 Mar 2003 11:29:36 -0700
>
> >It isn't quite that simple.
> >
> >When a program spawns a remote, the parent can do pretty much as you
said,
> >and use
> >
> >    windowname.document.formname.varname.attribute  -- OR --
> >    windowname.document.framename.document.formname.varname.attribute
> >// one or more frames
> >
> >to call up the bits in the child window(s).
> >
> >When the child program wants to access items in the parent window, it is
a
> >bit more complicated.
> >
> >    For a single form, no-frame parent:
> >
> >    window.opener.document.formname.varname.attribute
> >
> >    For multiframe, multiform parent(s):
> >
> >    window.opener.parent.document.formname.varname.attribute -- OR --
> >
>
>window.opener.parent.document.framename.document.formname.varname.attribute
> >
> >  It gets REALLY tedious when you start embedding things inside <OBJECT>
> >declarations, as it appears with
> >MicroSloth's defective DOM structure you can only go from the parent to
the
> >child, and not backwards.  I won't even attempt to give you a path map
for
> >this -- it is too complicated to explain lucidly in a few sentences.
> >
> >  The reason the second 'document' declarations are needed inside pages
with
> >frames is that the frame acts as a document boundary, and to access the
> >internals of one you must 'bust-through' the hard outer layer to get at
the
> >soft and chewy insides.
> >
> >  Hope this helps.
> >
> >  -- Dave Lovering
> >
> >----- Original Message -----
> >From: "Chris Tifer" <christ at saeweb.com>
> >To: "[JavaScript List]" <javascript at LaTech.edu>
> >Sent: Friday, March 21, 2003 7:49 AM
> >Subject: Re: [Javascript] Enumerating Other Window
> >
> >
> >> You just have to target which window you want to look through by
> >> using the handler you used when opening the window.
> >>
> >> Chris Tifer
> >> http://www.emailajoke.com
> >>
> >> ----- Original Message -----
> >> From: <uplate at attbi.com>
> >> To: <Javascript at LaTech.edu>
> >> Sent: Friday, March 21, 2003 9:30 AM
> >> Subject: [Javascript] Enumerating Other Window
> >>
> >>
> >> > Greetings;
> >> >
> >> > using the window.open() method is it possible to open another URL and
> >then
> >> > enumerating through it's links or images arrays?
> >> > Opening the window is no problem and even using a for loop to
retrieve
> >the
> >> links
> >> > on the current document is no probllem, but I can't seem to get the
two
> >> working
> >> > together.
> >> > Any ideas?
> >> > Thanks.
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
>




More information about the Javascript mailing list