Welcome to WebmasterWorld Guest from 54.160.131.144

Forum Moderators: open

Message Too Old, No Replies

Availible Width/Height

I bet this one has been done before.

     

jsbwm

6:33 pm on Dec 22, 2001 (gmt 0)

10+ Year Member



Hey everyone sorry to ask this but i couldn't find anything on it. I was wondering how to get the available width and height of a user's screen in NS6. I tried using innerHeight and innerWidth but couldn't get any results.
Thanks alot,
-jim

keyplyr

6:47 pm on Dec 22, 2001 (gmt 0)

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



one way is with JavaScript:

<!--
self.moveTo(0,0);self.resizeTo(screen.availWidth,screen.availHeight);
//-->

add the opening and closing tags

added: sorry, not sure for NS6

tedster

7:15 pm on Dec 22, 2001 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Yes, it's screen.availWidth and screen.availHeight

The screen.width and screen.height properties show you the full resolution of the display.

screen.availWidth, and screen.availHeight shows you the size of the display that is not consumed by permanent fixtures of the browser and operating system, such as the Microsoft Internet Explorer menus and Windows Task Bar.

All four properties (and others) are available on both IE and Netscape browsers. The screen object is documented at Microsoft Link [msdn.microsoft.com] and Netscape Link [developer.netscape.com].

PC Mag Reference [pcmag.com]

jsbwm

8:18 pm on Dec 22, 2001 (gmt 0)

10+ Year Member



Thanks alot. Exactly what i was looking for!
-jim
 

Featured Threads

Hot Threads This Week

Hot Threads This Month