RegisterClientScriptBlock: What am I doing wrong

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I am trying to activate the following code on the click event of a popup
window.
If I comment out the lines where I assign the values to the hidden fields
the Parent page submits otherwise it does nothing. I don't get it.
I have used this code before. Any help is appreciated.

string s="<script>";
s += "window.opener.Form1.hiddenID.value = " + 6 + ";";
s += "window.opener.Form1.hiddenFlag.value = \"" + 1 + "\";";
s += "window.opener.Form1.submit();";
s += "window.close();";
s += "</script>";
this.RegisterClientScriptBlock("addPopup",s);


.



Relevant Pages

  • Re: Pop-up form sending data to the calling form?
    ... typical clicks a button to open a smaller window to enable a search, ... clicks in this popup form. ... well you can access your parent pages elements using javascript... ... why don't you user a javascript dhtml layer div popup and then use ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Hide main window, show dialog
    ... when SetParent should return the previous parent for the ... Window Handle, while in the latter, it returns 0. ... So it would appear that SetParent() ... then setting the parent of the popup to NULL does the trick. ...
    (microsoft.public.win32.programmer.ui)
  • Re: Parent Child Windows
    ... If your popup is a modal dialog window and you don't want to let a child ... the window.opener property is the parent window. ... >> I need the user to enter information in a textbox on the PopUp. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Need GridView Help Paging
    ... I am using 2 web pages parent and popup.PopUp window is opened using ... In PopUp page I am using GridView and DataGrid and want to do Paging. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Get value from popup(jsp) to parent(jsp) form
    ... > displaying records, afer selecting the record and clicking ok the ... `window.opener' in the popup refers to the "parent" window. ...
    (comp.lang.javascript)