View Single Post
  #5 (permalink)  
Old September 22nd, 2006, 07:07 AM
iamrashida83 iamrashida83 is offline
Authorized User
Join Date: May 2006
Location: , , .
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts

Suppose the id of textbox in parent i.e. A.aspx is txtMyTextBox, the id of DropDownList in child i.e. B.aspx is ddlMyDropDownList and SubmitButton in child is btnSubmit

JavaScript In B.aspx

<script language='javascript'>
function UpdateParent()

 var ParentElement = window.opener.document.getElementById('txtMyTextBo x');

 var ChildElement = window.opener.document.getElementById('ddlMyDropDo wnList');

 ParentElement.innerText = ChildElement.options[ChildElement.selectedIndex].value;



In child form i.e. B.aspx add attribute in the code file as

btnSubmit.Attributes.Add("OnClick", "UpdateParent();");