Well, this works:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
onload=function(){
document.getElementById('bob').style.height="350px";
}
</script>
</head>
<body>
<iframe id="bob" src="about:blank" width="100" height="100" scrolling="auto" frameborder="1"></iframe>
</body>
</html>
So, I'm not sure what the problem is with setting the iframe's height. To get the width of an element do this:
Code:
var fredWidth=document.getElementById('fred').offsetWidth
But, that won't get you anything useful unless the display property of 'fred' is not 'none' and 'fred' already contains the content and already possesses the styling it will have when you need to know its width.
Bookmarks