Page is a not externally linkable
- Code, Content, and Presentation
-- JavaScript and AJAX
---- How do I run ONLOAD inside document.write?


irock - 8:47 am on Jun 5, 2010 (gmt 0)


I kinda hope you understand what i'm trying to do here. I have a function that I want to load for iframe, but I am using document.write to display the iframe.

<script type="text/javascript">
//<![CDATA[

var cnetproductname = 'Buffalo';
var id = '32432443';
var type = 'reviews';

document.write('<iframe id="myFrame" frameborder=0 scrolling=no width=100% src="http://www.domain.com/grab.php?productname=' + productname + '&id=' + id + '&type=' + type + '&embed=0" onload="adjustMyFrameSize();" >');

//]]>
</script>


Thread source:: http://www.webmasterworld.com/javascript/4147289.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com