SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2003
    Location
    Paris
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy x lib finding window's height

    Hello,

    I am trying how to find out the value of the window's height and then how to set it up using x lib (or without x lib as long as it works!). I would prefer the inner height where we see the page without the menu and the bottom bar.

    thanks for your help,

    Yvan

  2. #2
    SitePoint Enthusiast
    Join Date
    Sep 2003
    Location
    Paris
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I found it:: Here is a copy for anyone interested::

    using the x lib, put that in a fonction:

    var maxHeight = xHeight("submitContainer");
    var maxWidth = xWidth("submitContainer")
    window.resizeBy(maxWidth-document.documentElement.clientWidth, maxHeight-document.documentElement.clientHeight);

    It works,

    Is there a X lib or CBE function for document.documentElement.clientWidth?

    thanks

    yvan

  3. #3
    SitePoint Enthusiast
    Join Date
    Sep 2003
    Location
    Paris
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    by the way this is what I had to do to find the correct Height and Width between different browser:

    if (window.innerHeight != null) {
    realHeight = window.innerHeight;
    } else {
    realHeight = document.documentElement.clientHeight;
    }
    if (window.innerWidth != null) {
    realWidth = window.innerWidth;
    } else {
    realWidth = document.documentElement.clientWidth;
    }

  4. #4
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi niooi, you're on the right track. The X functions are...

    xClientWidth() and xClientHeight()


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •