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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to find out screen resolution of a client machine by javascript?

Status
Not open for further replies.

sonyerricsonk750i

Programmer
Aug 24, 2007
12
0
0
IN


hiii all,

im developing a page for that i need to find out the screen resolution of the client machine which is using or viewving that page

did any1 knows how to find out the screen resolution of the client sides machine using javascript?

thnx

S
 
Hi

Code:
alert([i]'You resolution : '[/i]+screen.width+[i]' x '[/i]+screen.height)
Quick reference : JavaScript » Objects » Screen.

Sorry, but again, your requirement is stupid. You should design your site in a manner to not need to kn ow the resolution. Beside that, the screen resolution has nothing to do with the browser window's size. And again, better learn HTML before JavaScript.

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top