tags:

views:

1637

answers:

1

Within an iFrame, we need to get the parent's window/document height.

Is there a way to get this using jQuery?

I know we can use $(document).height() to get a page's height. I just can't figure out how to get the parent's value from within the iFrame.

Please help!

+2  A: 

jQuery is not needed.

parent.document.body.clientHeight

That works for me with IE7 and FF3.

Thinker
/facepalmThanks so much.This seems to work well enough in IE6 too.
Fred Wilson
I don't think this would work with an iframe from another site - would it? Not sure if the question cares however.
Adam Nelson