I'm trying to load some HTML into a DIV using JavaScript, but I can't alter the size of the DIV frame, no matter what I try. All I get is a small little frame in the middle of the browser window. I've tried CSS. I've tried 'width:' and 'height:'. Here's my code:
<div id="main">
</div>
<script type="text/javascript">
document.getElementById('main').innerHTML =
'<object type="type/html" data="welcome.html"><\/object>';
</script>
Don't concern yourself about why I want to do this -- it's part of a greater coding experiment.
divor theobject? Seems to work for me: jsfiddle.net/bKws9welcome.htmlinserted into the stream of your main page. Using anobjecttag won't do that. You could try to create aniframedirectly and then move the parent node of the contained DOM to the main document... might work, depending on same domain policy, I'd have to try to see.