Expand|Select|Wrap|Line Numbers
- string scriptString = "<script>javascript:window.opener.document.Form1.totalField.value =" + dNewTotalDue + "; javascript:window.opener.document.Form1.redeemField.value =" + dRedeemAmount + "; window.close();</script>";
- Page.RegisterStartupScript("Close", scriptString);
My Parent Window has this in a button click event:
Expand|Select|Wrap|Line Numbers
- Page.RegisterStartupScript("RedeemCard", "<script>javascript:window.open('" + redeemHwndUrl + "', 'RedeemCard', 'width=600,height=600,top=30,left=30,toolbars=no,scrollbars=no,status=no,resizable=no');</script>");
This all worked fine when I was using an html page as the Parent window. But it stopped working when I decided to use an asp.net page as the parent window.
I also switched from using and html <input type="text"...> textbox to: <asp:textbox id="totalField" runat="server" Width="80px" MaxLength="20"></asp:textbox>
The pop-up works fine and I can pas values from the Parent to the pop-up. But when I click on the child window button, it does nothing. The pop-up does not close and the Parent window fields do not get populated with the dNewTotalDue & dRedeemAmount varaible values.
Any help would be much appreciated!