Error 'document' is null or not object found when passing value back from child window to parent window
<p>I have tried to use the following code to passing value back from the child window back to the parent window</p>

<pre><code>      &lt;tr&gt;
        &lt;th class="clLabel"&gt;Unit&lt;/th&gt;
        &lt;td&gt;
          &lt;asp:TextBox ID="sUnit" runat="server" MaxLength="12" Width="3em" /&gt; 
        &lt;/td&gt;
      &lt;/tr&gt;


&lt;script type="text/javascript"&gt;

    $("#test").click(function () {
        var parent = $(parent.document.body);
        $(parent).find('input#sUnit').val("test");
        window.close();
    });

&lt;/script&gt;
</code></pre>

<p>But some how error message always display when it's come to this code of line</p>

<h1>NOTE: parent page and the child page is holding in the difference host (will this cause the problem?)</h1>

<p><img src="http://i.stack.imgur.com/maM2N.jpg" alt="enter image description here"></p>

<p>Does anyone know what is it going on? And how can I solve it?</p>
