Articles → JavaScript → Window.Opener in JavaScript

Window.Opener in JavaScript







<form id="frmDefault" runat="server">
   <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
   <asp:Button ID="btnTest" Text="Click" runat="Server" />
</form>




function TestOpener() {

  window.open("OpenerPage.aspx");

}






<script type="text/javascript">
alert(window.opener.document.frmDefault.txtName.value);  
</script>






Picture showing the output of Window.Opener in JavaScript

Click to Enlarge






Posted By  -  Karan Gupta
 
Posted On  -  Tuesday, December 21, 2010

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250