Click here to Skip to main content
16,020,990 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have one parent form and a child form.
i am passing the value of selected id from radgrid to child page.and receive the value through query string
like this..................
var text;
   function RowSelected(sender, args) {
       document.getElementById("<%=Label4.ClientID %>").innerHTML = args.getDataKeyValue("Number");
       text = document.getElementById("<%=Label4.ClientID %>").innerHTML;

   }

   function ClosedClicked() {

       window.open("PurchaseOrderpopuptest.aspx?controlID=" + text);
   }



in my child page receiving value like this
.....................................
C#
string controlID = "";
       protected void Page_Load(object sender, EventArgs e)
       {
         controlID = Request["controlID"].ToString ();
         TextBox1.Text = controlID;
       }

...........................
then what i want to do is i want send the value back to parrent page

C#
function sendvalue() {

            var textval = document.getElementById('TextBox1').value;
            alert(textval);          
            window.opener.document.forms.namedItem('Label6') = textval;        
            window.close();
            return false;
        } 

if i comment this line
C#
window.opener.document.forms.namedItem('Label6') = textval;

then the script execute but with htis line script is not executing
so, anyone help me how to solve this problem.
label6 is the control of parent page
Thank You
Posted

Make sure Label6 is not a server control. The clientID may be not Label6.
For example if the label sits on a panel clientid will be Panel1_Label6
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900