[Javascript] Window dimensions?

diego nunes dnunes at gmail.com
Sat Jul 15 17:04:27 CDT 2006


On 7/15/06, tedd <tedd at sperling.com> wrote:
> John:
> (...)
> if (parseInt(navigator.appVersion)>3)
>         {
>         if (navigator.appName=="Netscape")
> (...)

    It would be good to point out that "navigator detection" is
deprecated. You could use, instead:

if (window.innerWidth) {
  winW=window.innerWidth;
  winH=window.innerHeight;
} else if (document.body.offsetWidth) {
  winW=document.body.offsetWidth;
  winH=document.body.offsetHeight;
}

  Amplexos.

--
diego nunes
dnunes.com



More information about the Javascript mailing list