got error in firefox while using document.open()
<p>I can now open Iframes with javascript to write content into it. It gives me a security error, since i do not use any cross-site stuff.</p>

<p>I create the Iframe with javascript, and I want to write into it with same javascript.</p>

<p>CODE:</p>

<pre><code>var iframe = document.createElement("iframe")
var doc = iframe.contentDocument || iframe.contentWindow.document;
doc.open();
doc.write("htmlcontent");
doc.close();
</code></pre>

<p>ERROR in firefox:</p>

<blockquote>
  <p>Exception: Security error"  code: "1000" nsresult: "0x805303e8 (NS_ERROR_DOM_SECURITY_ERR)"  location:"unknown"</p>
</blockquote>

<p>working fine in IE</p>

<p>Please let me know the solution for the above error.</p>
