get label value in javascript through iframe
<p>i have an aspx page containing following code</p>

<pre><code>&lt;body&gt;
    &lt;script language="javascript" type="text/javascript"&gt;
        function Hidee()
        {
        alert(window.frames["frame1"].document.getElementById("Label1").text);
        }
    &lt;/script&gt;
    &lt;form id="form1" runat="server"&gt;
    &lt;div&gt;
    &lt;iframe id="frame1"  name="frame1" class="frame" frameborder="0" src="Default4.aspx"&gt;&lt;/iframe&gt;
         &lt;a onclick="javascript:Hidee()" style="cursor: pointer"&gt;close&lt;/a&gt;
    &lt;/div&gt;
    &lt;/form&gt;
&lt;/body&gt;
</code></pre>

<p>in Default4 page i have a label with id Label1 
when i click on close button i get <strong>undefined</strong> alert message</p>
