Vladdy
11-20-2002, 07:55 PM
I decided to substitute IFRAME with an OBJECT and here's what I found...
Consider the code below: straight forward creation of an object element...
<html>
<head>
<title>test</title>
<script>
function test()
{obj = document.createElement('object');
obj.className = 'myObject';
obj.type = 'text/html';
document.body.appendChild(obj);
obj.data = 'file.html';
document.body.innerHTML+='';
}
</script>
<style>
.myObject
{width:300px;height:200px;border:groove 4px blue;}
</style>
</head>
<body onload="test()">
</body>
</html>
If you comment the the red line out, the object is created but file is not loaded. By pure chance I found that only if I add the
document.body.innerHTML+='';
the file is loaded (go figure the connection here)...
Also, IE's globe thing never stops spinning even though the file.html is a simple
<html><head></head><body>Some File</body></html>
If anyone knows of a better way around, rather than manipulating the innerHTML, I would like to hear it...
The above is checked with IE5+ and Gecko
Consider the code below: straight forward creation of an object element...
<html>
<head>
<title>test</title>
<script>
function test()
{obj = document.createElement('object');
obj.className = 'myObject';
obj.type = 'text/html';
document.body.appendChild(obj);
obj.data = 'file.html';
document.body.innerHTML+='';
}
</script>
<style>
.myObject
{width:300px;height:200px;border:groove 4px blue;}
</style>
</head>
<body onload="test()">
</body>
</html>
If you comment the the red line out, the object is created but file is not loaded. By pure chance I found that only if I add the
document.body.innerHTML+='';
the file is loaded (go figure the connection here)...
Also, IE's globe thing never stops spinning even though the file.html is a simple
<html><head></head><body>Some File</body></html>
If anyone knows of a better way around, rather than manipulating the innerHTML, I would like to hear it...
The above is checked with IE5+ and Gecko