Tom Cole wrote:
<snip>
Have you tried
parent.frames['outputframe'].frames['frame_to_get_focus'].focus() or
parent.outputframe.frame_to_get_focus.focus()?
I'm not 100% clear on which is the preferred or most compliant method
(the dot notation or array style access)...
I'm not 100% clear on which is the preferred or most compliant method
Referencing the window objects of named frame (and IFRAME) elements as
named properties of the containing window object's - frames - collection
is the most cross-browser (and so usually 'preferred') strategy.
(the dot notation or array style access)
No distinction between dot notation property accessors and bracket
notation property accessors has significance here. The two are
equivalent in what they do. All dot notation property accessors could be
re-written as bracket notation property accessors and produce precisely
the same results. The reverse is only not true because the dot notation
property accessor requires that the tokens on each side of the dot be
Identifiers, while the bracket notation places no restrictions on the
character sequence strings used inside the brackets (so the former can
only access a limited set of property names, while the latter is
unrestricted in the property names it can reference), and the
expressions used between the brackets in a bracket notation property
accessor are evaluated and type-converted into a string prior to their
use as a property name (which is unnecessary with a dot notation
property accessor), allowing the property name used to be unknown until
runtime.
parent.frames['outputframe'].frames['frame_to_get_focus'].focus()
- and:-
parent.frames.outputframe.frames.frame_to_get_focu s.focus()
- are equivilent.
Richard.