RE: Window inner height?

Arjen Geerse <[email protected]>
Newsgroups gmane.comp.web.dom.wdf
Message-ID <302E6CBDF25DD511B74600508BB36D480964A227@mailbox1.amsterdam.lostboys.com>
This should do the trick

	this.viewHeight = (frame.innerHeight) ? frame.innerHeight :
(frame.document.documentElement &&
frame.document.documentElement.clientHeight) ?
frame.document.documentElement.clientHeight :
frame.document.body.clientHeight;

Not sure if i wrote this or ripped it from PPK's site though :)

Regards, Arjen

-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf
Of Seb Frost
Sent: woensdag 2 november 2005 16:38
To: [email protected]
Subject: [wdf-dom] Window inner height?


I have a customized context menu that I'm popping up on right-click on an
intranet system.  I'm a standards zealot normally but this is a case where
functionality comes before compatibility etc.

Now the problem is when the user right clicks at the bottom of the screen,
the context <ul> I have will appear but mostly be obscured as it's hidden at
the bottom of the screen.

So what I want is a simple line of code so I can position it further up the
page if it can't fit on.

From what I can figure out this means I need to have some way of figuring
out the inner height of the browser window?

I assume window.innerHeight does this but it;s not supported by IE6.


Any other suggestions of how I can work it out by combining other height
references appreciated!

I've got as far as:

1) document.documentElement.scrollTop
2) window.event.clickY
3) document.getElementById('contextmenu').offsetHeight

The missing link is the inner height of the browser window - cheers!!




Unsubscribe
[email protected]

List info
http://www.quirksmode.org/dom/list.html 
Yahoo! Groups Links



 



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page
http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/9rHolB/TM
--------------------------------------------------------------------~-> 

Unsubscribe
[email protected]

List info
http://www.quirksmode.org/dom/list.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/wdf-dom/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.