Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
rammohan
Posting Yak Master
212 Posts |
Posted - 2007-08-09 : 06:14:00
|
Hi, I Have Two Forms. one is parent.aspx another one is child.aspx. in the page load of parent.aspx i have written the following code:if (!IsPostBack) { string str = @"<script>function get(elemValue) { document.getElementById('txtDisplay').innerText=elemValue; //document.write(string); }</script>"; Page.RegisterClientScriptBlock("get", str); Button1.Attributes.Add("onclick","window.open('Child.aspx');"); }in the page load of Child.aspx i have written the following code if (!IsPostBack) { string scr = @"<script>function Sent() { var fName=document.getElementById('txtClick').value; window.opener.get(fName); window.close(); } </script>;"; //Page.RegisterStartupScript("Sent", scr); Page.RegisterClientScriptBlock("Sent", scr);Button1.Attributes.Add("onclick", "window.close();"); }my aim is to send the values from child form to parent form.after clicking the button in pop up window the window is closing but the value is not set to the text box control in parent form. please suggest me on this issueOne can never consent to creep,when one feels an impulse to soarRAMMOHAN |
|
cvraghu
Posting Yak Master
187 Posts |
Posted - 2007-08-09 : 13:02:22
|
I see that you've registered the script in child window. But i don't see where you call the function Sent(). Thats the reason. |
|
|
|
|
|