|
I've got an IFRAME
it loads a page with variable contents
I need to know the WIDTH of the body of that page
I'm using offsetWidth and offsetHeight
var BODYWIDTH = 0
var dyniframe = document.getElementById("Nvg")
if (dyniframe && !window.opera) {
if (dyniframe.contentDocument && dyniframe.contentDocument.body.offsetHeight) //ns6 syntax
BODYWIDTH = dyniframe.contentDocument.body.offsetHeight; //+ FFextraHeight;
else if (dyniframe.Document && dyniframe.Document.body.scrollHeight) //ie5+ syntax
BODYWIDTH = dyniframe.Document.body.scrollHeight;
}
alert("The WIDTH of the body of the page inside the iframe is "+ BODYWIDTH) |
|
This is weird....
offsetHeight returns the height of the document body
offsetWidth returns the width of the iframe !!!!!!! (??????????)
Please, what am i doin wrong??
|
|
|
|
|
|
|
|
|
|