availHeight/Width in Opera

Discussion in 'Javascript' started by Severus Snape, Jun 5, 2005.

  1. I've noticed that screen.availHeight/availWidth don't return
    correct results in Opera 8, meaning that what Opera returns are
    the pure screen dimensions, no the actual dimensions due to
    taskbars or similar. On the other hand other browsers (MSIE,
    Netscape, Mozilla) get this correct.
    Anybody knows of a workaround?

    Severus Snape, Jun 5, 2005
    1. Advertisements

  2. That would represent a regression as Opera 7.23 certainly did return
    availHeight/Width dimensions that took the taskbar into account, but
    earlier versions did not. Not that it matters much as screen dimensions
    have little to do with anything, and never could be expected to be an
    accurate source of information (particularly on multi-monitor
    When you are dealing with aspects of a browser DOM that is not covered
    by public specifications there is no criteria for 'correct'. Browsers
    have always differed in their interpretation of screen dimensions, and
    they still do.
    Design out all need to be interested in the screen dimensions.

    Richard Cornford, Jun 5, 2005
    1. Advertisements

  3. In my Opera 8, build 7561, screen.availHeight gives me 1170, which is
    correct (and the same value that IE gives). What exact build are you
    using and what code are you using to find screen.availHeight? And are
    you running in MDI or SDI mode? Do you have any user.js code installed?

    (and what do you need the screen size for anyway? :)

    Lasse Reichstein Nielsen, Jun 5, 2005
  4. I must partially rectify what I said.
    The incorrect behaviour occured with Opera 8.0 build 1095 under FreeBSD.
    I then tried with Opera 8.0 build 7561 under Windows and it worked all
    Perhaps it's just something about freebsd, even though the other browser
    I tried worked ok (mozilla, konqueror).
    Well, to tell the truth I'm trying to build a minimal javascript
    object-oriented, agent-indipendent library for most common browser
    oparations. The screen size comes into play when I want to open a
    window to maximum dimension. As you know, only MSIE supports the
    fullscreen attribute, so if you want to do the same under`other browsers
    you have to manually set the dimensions to the screen size.

    Severus Snape, Jun 5, 2005
  5. Severus Snape

    DU Guest

    screen.availHeight/availWidth are not updated in real time in Opera 8.
    Besides that issue, Opera 8 reports accordingly
    screen.availHeight/availWidth property values. Opera 8.01 build 7624 here.

    DU, Jun 5, 2005
  6. Severus Snape

    DU Guest

    Generally speaking, I'd say they agree rather than they differ. In a
    majority of cases, they do agree; in a minority of cases, they differ.
    I think this sort of response should be underlined, repeated and
    explained more often. screen properties (and window related-measurements
    properties) are pretty much useless. Designing with screen (and window
    related-measurements) properties goes against flexible, scalable webpage
    design, goes against interoperability on different media and web-aware

    DU, Jun 5, 2005
  7. Even with the screen dimension known, Opera in MDI mode will not allow
    a full screen window (well, the window is there, you just can't see
    any more of it than the size of the Opera main application window :).
    Seems that's one of the functionalities that won't work on all
    browsers (and I'm quite happy my Opera won't allow it ... bloody
    pages better stay where I say they can go, or its closing time :).

    Lasse Reichstein Nielsen, Jun 6, 2005
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.