How could I add some attribute of a pop-up window from the parent window?
===

So I have a pop-up window opened by the following from the parent page:

    popitup("foobar.html");
    
    function popitup(url) {
    	newwindow=window.open(url,'name','height=700,width=1000');
    	if (window.focus) {newwindow.focus()}
    	return false;
    }

After the page is popped up, I want to add the following to the **body tag** of the pop-up

    <body onunload="window.opener.parent.location.reload();">

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? 

thanks!

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

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?

    jQuery("#ifrm").load( function(){})

