Test iframe htmlinject
HTML
<iframe id='abba'></iframe>
<div id='cabba'></div>
Other content
JavaScript
function putHTMLIntoIframe(iframeID,html){
var iframe=dojo.byId(iframeID);
var doc = iframe.document;
if(iframe.contentDocument)
doc = iframe.contentDocument; // For NS6
else if(iframe.contentWindow)
doc = iframe.contentWindow.document; // For IE5.5 and IE6
// Put the content in the iframe
//doc.open();
doc.body.innerHTML = html;
//doc.close();
}
var css='<style> body{font-family: Tahoma;}</style>';
putHTMLIntoIframe('abba',"<script>function test(){alert(3);}</script><b>Test</b>one"+css);
dojo.byId('cabba').innerHTML='<b>Test</b>two'+css;
setTimeout(function(){dojo.byId('cabba').innerHTML='';},5000);