Get frame size : JavaScript DHTML examples (example source code) » HTML » Frame FrameSet

JavaScript DHTML
C++
Java Products
Java Articles
JavaScript DHTML Home  »   HTML   » [  Frame FrameSet  ]   
 



Get frame size

<!-- 
     Example File From "JavaScript and DHTML Cookbook"
     Published by O'Reilly & Associates
     Copyright 2003 Danny Goodman
-->


function getFrameSize(frameID) {
    var result = {height:0, width:0};
    if (document.getElementById) {
        var frame = parent.document.getElementById(frameID);
        if (frame.scrollWidth) {
            result.height = frame.scrollHeight;
            result.width = frame.scrollWidth;
        }
    }
    return result;
}
Related examples in the same category
1.  Frameset in Javascript
2.  Create frameset
3.  Hide and Show Frame Example
4.  Handling Load Events in a Layout Document
5.  Frameset for document.URL Property Reader
6.  Creating a Blank Frame
7.  A blank frameset with Javascript
8.  Make new frameset
9.  Frameset Navigator
10.  Frameset show and hide
11.  Multiple Search Engine








Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.