RE: Window inner height?
"Seb Frost" <[email protected]>
| Newsgroups | gmane.comp.web.dom.wdf |
|---|---|
| Message-ID | <[email protected]> |
Thanks Arjen, I had a look on quirksmode but couldn't find the relevant bit! -----Original Message----- From: [email protected] [mailto:[email protected]]On Behalf Of Arjen Geerse Sent: 02 November 2005 15:42 To: '[email protected]' Subject: RE: [wdf-dom] Window inner height? 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 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/