Welcome to WebmasterWorld Guest from 54.144.72.150

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)

Inactive Member
Account Expired

 
 


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
6:47 pm on Dec 22, 2001 (gmt 0)

Senior Member from US 

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

joined:Sept 26, 2001
posts:5797
votes: 64


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

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

Senior Member

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

joined:May 26, 2000
posts:37301
votes: 0


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)

Inactive Member
Account Expired

 
 


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