$( window.parent.document ).height() throws error from child iframe

$( window.parent.document ).height() throws error from child iframe


Hello all.
I have two html documents.
(1) parent.html
<html>
<body>
<iframe src="child.html"/>
</body>
</html>
(2) child.html
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/
ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript">
alert( $( window.parent.document ) );
// CORRECT: alerts "[object Object]"
alert( $( window.parent.document.body ).height() );
// CORRECT: alerts "154"
alert( $( window.parent.document ).height() );
// ERROR: "Could not convert JavaScript argument arg 0"
alert( $( window.parent ).height() );
// ERROR: "Could not convert JavaScript argument arg 0"
</script>
</head>
</html>
As is visible from the code, I'm having trouble getting the height of
the document in the parent window. I can access the window, document,
and body of the parent without issue, but can only access the height
of the parent's body. An error is thrown when I try to access the
height of the parent window or document.
Is there something I'm missing here, or does this need a ticket?
Jed Schmidt