1 Replies - 1004 Views - Last Post: 08 June 2002 - 10:32 AM

#1 gitz  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 06-June 02

Checking Resolutions In Javascript

Posted 08 June 2002 - 08:22 AM

it's the simplest thing, but i cant find it anywhere. can anyone help find an object property that checks a user's screen resolution? i've heard of a few things, like window.width, window.length, but they dont seem to work. any help? thanks
-gitz-
Is This A Good Question/Topic? 0
  • +

Replies To: Checking Resolutions In Javascript

#2 skrilla monkey  Icon User is offline

  • goat.face

Reputation: 0
  • View blog
  • Posts: 838
  • Joined: 14-January 02

Re: Checking Resolutions In Javascript

Posted 08 June 2002 - 10:32 AM

yup:
<script language="javascript">
<!-- hide JS from old browsers

function checkWinSize() {
   var screenWidth = screen.width;
   var screenHeight = screen.height;
}
// end hiding JS -->
</script>
<body onload="checkWinSize();">


that's how id go about it :)

-pete

btw: im pritty sure this should go in the "HTML" forum ;) just a suggestion :D
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1