www.webdeveloper.com
Results 1 to 3 of 3

Thread: how to set height of window popup.

  1. #1
    Join Date
    Nov 2011
    Posts
    2

    how to set height of window popup.

    Hi!
    I've got a popuped window and I need to set it height. There is innerHeight property in firerox which works perfectly but I can not find any workaround to other browsers. I found window.resizeTo(width, height) but the values are absolute that means that it calculates inner window height and outside area with system bars etc.
    I look for the way I can do this with firefox.
    Thanks for any tip in advance

  2. #2
    Join Date
    Oct 2010
    Location
    Versailles, France
    Posts
    1,265
    This function is perhaps always cross browsers ?
    Code:
    function heightWidth(){var d=document,lrd,hrd;
    	if (typeof(window.innerWidth)=='number') {lrd=window.innerWidth;hrd=window.innerHeight;}
    	else if (d.documentElement && d.documentElement.clientWidth) {lrd=d.documentElement.clientWidth;hrd=d.documentElement.clientHeight;}
    	else if (d.body && d.body.clientWidth) {lrd=d.body.clientWidth;hrd=d.body.clientHeight;}
    	return [lrd,hrd];
    }

  3. #3
    Join Date
    Nov 2011
    Posts
    2
    thanks for your response and attached code unfortunatel my problem is that I need to stretch window popup object what is done perfectly in firefox. In IE instead we change size of document element which affects html and body tag I believe changing its size but it doesnt change popuped window size. This resulting that some elements can't be seen or you see to much.
    In fact this code for IE:
    d.documentElement.clientHeight = value;
    where I pass the value to set my window doesn't seem to work, so I quees I can only retrieve clientHeight.
    Is there any solution to this, or am I doing things wrong...?
    Kindest Pawel

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles