FalconMaster
Programmer
Hi all,
I have been trying to make a window pop-up in the center of another window that I have.
I have seen other posts here, and have researched myself to find some methods of getting height and width of a window except under the following circumstance.
If I have a window that is not part of a frameset/iFrame , then the closest thing I can find to get the height is various properties of the document.body object such as clientHeight,scrollHeight, and/or offsetHeight. The problem is that these all give the height of the document and not the viewable area of the window itself, so if I have a large document, my pop up window ends up off the screen somewhere.
when the window is in a frameset, I can use the frameElement object of the window to find out its .height and .width perfectly. in fact, that is the information I want. But my application allows the user the possibility of opening multiple windows(required) for the same form, if they do not want it in a frame, and once the page is outside of a frameset, the frameElement object no longer exists.
Has anyone found any other way of getting the size of the viewable window of a page when it is not in a frameset?
I have been trying to make a window pop-up in the center of another window that I have.
I have seen other posts here, and have researched myself to find some methods of getting height and width of a window except under the following circumstance.
If I have a window that is not part of a frameset/iFrame , then the closest thing I can find to get the height is various properties of the document.body object such as clientHeight,scrollHeight, and/or offsetHeight. The problem is that these all give the height of the document and not the viewable area of the window itself, so if I have a large document, my pop up window ends up off the screen somewhere.
when the window is in a frameset, I can use the frameElement object of the window to find out its .height and .width perfectly. in fact, that is the information I want. But my application allows the user the possibility of opening multiple windows(required) for the same form, if they do not want it in a frame, and once the page is outside of a frameset, the frameElement object no longer exists.
Has anyone found any other way of getting the size of the viewable window of a page when it is not in a frameset?