.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Home >> Forum >> JavaScript/VBScript >> Post New QuestionBookmark and Share Subscribe to Forum

Hi how to get the textbox value from child window to parent window

Posted By: jay     Posted Date: April 05, 2010    Points:2   Category :JavaScript/VBScript
Hi how to get the textbox value from child window to parent window

onclick of a button in parent window a childbutton opens that contains one textbox and one button i will enter some value in textbox on click 0f button in child window i want to display in parent windo. using javascript.

Author: Dilip             
Posted Date: April 05, 2010     Points: 5   

Check this code:

Parent Window

<form method=post action='' name=f1>
<td >
<font size=2 face='Verdana'>Your Name</font><input type=text name='p_name' size='8'>
<a href="javascript:void(0);" NAME="My Window Name" title=" My title here "
onClick=window.open"child3.html","Ratting","width=550,height=170,left=150,top=200,toolbar=1,status=1,");>Click here to open the child window</a>

Child Window Window


<script langauge="javascript">
function post_value(){
opener.document.f1.p_name.value = document.frm.c_name.value;

<title>(Type a title for your page here)</title>

<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000">

<form name="frm" method=post action=''>
<table border=0 cellpadding=0 cellspacing=0 width=250>

<tr><td align="center"> Your name<input type="text" name="c_name" size=12 value=test> <input type=button value='Submit' onclick="post_value();">


Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend