Click to See Complete Forum and Search --> : screen resolution


Max^Power
12-27-2002, 03:45 AM
is there a way to detect the screen resolution of a user? Also when someone design a website what screen resolution does usually design it for?

ShrineDesigns
12-27-2002, 06:01 AM
here is a simple example

<a href="javascript:void(0);" onClick="alert(screen.width + ' x ' + screen.height)">this link</a>
<a href="javascript:void(0);" onClick="alert(screen.availWidth + ' x ' + screen.availHeight)">this link</a>

Charles
12-27-2002, 06:33 AM
That will tell you the number of pixels across someone's entire screen if, and only if, they are using JavaScript. That means that it will not work for the one or so in ten users. And when it does work it will not tell you the number of pixels across someone's window. Nor can you know the number of pixels per inch on a users screen.

No, you are supposed to design your page so that it works on any size screen at any pixel density just as you are supposed to design for those who have no screen at all. You have to think differently about your page and about HTML, but it's a great deal easier to design this way.

Shothole
12-27-2002, 07:12 AM
hi guys
does anyone know hey to run these to functions on the same event or is there anyway to get them to run, i am trying to get a full screen function to run and a screen res detect function to run aswell on a on click event, has anyone got any ideas or encounted this before, i can get both functions to work on there own but not together .
thanks