I have a script trying to change the height in an object tag. It is working in most browsers but a few, like IE7 are tossing an error:
Here is the script, the line with the obj.height is what is causing the problem. I tried changing the setting of obj to getElementByTagName and it works (no error message) but the object on the main page doesn't resize in any browser.
Here is the script:
Here is a snippet of the main page with the div containing the object:
Let all bear in mind that a society is judged not so much by the standards attained by its more affluent and privileged members as by the quality of life which it is able to assure for its weakest members.
Here is the script, the line with the obj.height is what is causing the problem. I tried changing the setting of obj to getElementByTagName and it works (no error message) but the object on the main page doesn't resize in any browser.
Here is the script:
Code:
function loaded() {
var body = document.body,
html = document.documentElement;
var s = Math.max(body.offsetHeight, html.scrollHeight, html.offsetHeight);
var obj = document.getElementById("objContent");
obj.height = s + 10;
}
Here is a snippet of the main page with the div containing the object:
Code:
<div id="divContent" class="left">
<object id="objContent" data="Home/Prayer.html" width="100%" height="100%" type="text/html"></object>
</div>
Let all bear in mind that a society is judged not so much by the standards attained by its more affluent and privileged members as by the quality of life which it is able to assure for its weakest members.