Menu

#267 getWidth Error in IE6

open
nobody
5
2006-09-29
2006-09-29
d_drummonds
No

have small script that works with FireFox but fails
with IE6.

<html>
<head>
<script language="JavaScript"
src="/dynapi/src/dynapi.js"></script>
<script language="Javascript">
dynapi.library.setPath('/dynapi/src/');
dynapi.library.include('dynapi.api');
dynapi.library.include('dynapi.api.ext.DynLayerInline');
dynapi.onLoad(init);

var theFrame;
var theFrameTable;

function init() {
theFrame = DynLayer.getInline("theFrame");
theFrameTable = DynLayer.getInline("table2");

var width = dynapi.document.getWidth() - 5;
var height = dynapi.document.getHeight() - 5;
theFrameTable.setHeight(height - theFrameTable.getY());
theFrameTable.setWidth(width - theFrameTable.getX());
theFrame.setHeight(theFrameTable.getHeight()-12);
theFrame.setWidth(theFrameTable.getWidth()-12);
}
</script>
</head>
<body>

<table id=table2 width=500 style="position: absolute;
top: 75px; left: 120px">
<tr><td>
<iframe height=100% width=100% id=theFrame
name=theFrame src=""></iframe>
</td></tr>
</table>
</body>
</html>

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.