See... I need to not respond to stuff when hungry. Actually your code does look like it should be working. I'm honestly just not a fan of using object in this manor, or at least in a complex manor. Personal bias I'm prolly going to have to get over. It's mainly because, now maybe I've missed something here, but putting classid="clsid:25336920-03F9-11CF-8FD0-00AA00686F13" in the object chokes Firefox, but without it IE won't load the frame.
ANYWAY... I do recall IE8 being a little odd with how it loads things and what order it will run stuff.
Take for instance these two scripts:
index.htm
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
</head>
<body>
<iframe src="help.htm"></iframe>
<!--
<object classid="clsid:25336920-03F9-11CF-8FD0-00AA00686F13"
data = "help.htm"
type = "text/html" class = "upload-ie">
<p>well that doesn't work at all</p>
</object>
-->
<script>
var woot = 5;
alert( window.frames.length );
alert( window.parent.woot );
var f = window.frames[0];
alert( f.woot );
</script>
</body>
</html>
help.html
Code: Select all
<html>
<head></head>
<body>
<script>
var woot = 2;
alert( '----' );
alert( window.parent.woot );
</script>
hello work
</body>
</html>
Yes, I'm kinda implementing a race condition here, but this is just trying to show a point. Run it in IE6, Firefox, and IE8. Notice something odd?
Yup, IE6 and IE8 load it in completely different orders. So different in fact that IE8 won't be able to display the data from the iframe. So, perhaps your problem is the order you're allowing things to get loaded? Remember, the browsers will try to load two things simultaneously, not just one at a time. IE6 actually seems to load it in the move correct order.
Now, if I switch if over the <object> the JS doesn't even run in either of the IE instances. This could however be a result of the security settings here, I will need to test this at home.
Hope this at least gives you an idea of a way to go. However, from what I remember, what you're trying to do just won't work with <object> and IE.