How could I add some attribute of a pop-up window from the parent window?
<p>So I have a pop-up window opened by the following from the parent page:</p>

<pre><code>popitup("foobar.html");

function popitup(url) {
    newwindow=window.open(url,'name','height=700,width=1000');
    if (window.focus) {newwindow.focus()}
    return false;
}
</code></pre>

<p>After the page is popped up, I want to add the following to the <strong>body tag</strong> of the pop-up</p>

<pre><code>&lt;body onunload="window.opener.parent.location.reload();"&gt;
</code></pre>

<p>How could I reach out and do such modification from the parent window? Do I have to include such code in a function that runs after the pop-up is loaded? </p>

<p>thanks!</p>

<p>P.S. all pages are in the same domain. I want to do the modification after the pop up is loaded.</p>

<p>I understand there is some function that could run after an iframe is loaded, could such function also be applied to a pop up in some variance way?</p>

<pre><code>jQuery("#ifrm").load( function(){})
</code></pre>
