Screen Resolution Detection

They have: 6 posts

Joined: Nov 1999

Can anyone tell me how to add code into my webpage to detect the monitor resolution?

Cheers.

Josh Simpson's picture

They have: 147 posts

Joined: Dec 1999

Cool idear can it be done? I would like to know to.

------------------
Josh www.bigfoot.com/~josh.simpson
[email protected]

ICQ: 53809511

John Pollock's picture

He has: 628 posts

Joined: Mar 1999

Use screen.width and screen.height in JavaScript-- only works in version 4+ browsers though. If your looking for an 800x600 or greater screen:

<SCRIPT language="JavaScript">
<!--
if ((screen.width >=800) && (screen.height >= 600))
{
do something;
}
//-->
</SCRIPT>

You can do plenty of other things too, have fun!

------------------
John Pollock
http://www.pageresource.com
http://www.javascriptcity.com

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.