On Sat, 14 Feb 2004 17:54:25 GMT, Richard Bell <rbell01824@earthlink.net>
wrote:
[color=blue]
> I would like to open a 'child' window win and check it's ready state.
> Unfortunately, when I try to do so, I discover that win.document does
> not appear accessable from the parent window, see below. Is this by
> design or am I doing something wrong.[/color]
It depends. If the page in the new window is from a different domain, you
might get an access error due to security restrictions. Also, you do
realise that readyState is a non-standard property and might not work on
all browsers?
At the moment, the problem is that you haven't capitalised the identifier
properly; JavaScript is case-sensitive, remember. You need to access it
with:
winObj.document.readyState (not readystate)
You have this problem with addEventListener in a couple of places: you
write it 'addeventListener'.
Two final comments relate to your HTML.
1) The heading, H1, and script elements are outside of valid blocks. Move
H1 within BODY and SCRIPT within HEAD or BODY, as appropriate.
2) The script element is missing the required type attribute. It should be
written as shown below. Notice that the language attribute (which is
deprecated) is not necessary when "type" is used.
<script type="text/javascript">
Hope that helps,
Mike
--
Michael Winter
M.Winter@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)