Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

size of a window

Status
Not open for further replies.

zekmek

Programmer
Jun 12, 2003
44
0
0
PT
hello everybody,

is it possible to get the size of a window (not screen) ? if yes, how ? cause i would like to get the size so that i can place my popup at the center of it...

Thanx [:)]
 
This will give u screen height and width:
alert(screen.width+"\n"+screen.height)

This will give u screen height and width available (ie minus space taken by taskbar etc):
alert(screen.availWidth+"\n"+screen.availHeight)


Note: a search in this forum ought to give better results...

Known is handfull, Unknown is worldfull
 
thanks vbkris but screen.height gives me the height of the screen and not the window. i wanted the size of the window.

thanks
 
oh. i dont know how that can be done. try self.height or self.width...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top