[thelist] NS 7.0 ScreenSize Bug

Sam Carter sam at nativeintelligence.com
Thu Dec 5 07:15:18 CST 2002

[ Picked text/plain from multipart/alternative ]
Hello all..

We try to collect client statistics (display resolution, browser type)
when users login to our course.

The script to capture screen resolution is the last two lines inserted
in the setfocus procedure.  Values are saved in hidden input fields and
PUT to the server with the form is submitted.

<script language="JavaScript">
function setfocus (input) {
  if (input.createTextRange) {
    var range = input.createTextRange();
    document.LoginForm.strResWidth.value = window.screen.availWidth;
    document.LoginForm.strResHeight.value  = window.screen.availHeight;

It's worked fine in every browser I tested, except Netscape 7.0.  It
seems no values are stored for strResWidth or Height.

Being a server-side programmer myself, any help from the audience on
this client-side issue would be appreciated.


More information about the thelist mailing list