Results 1 to 2 of 2

Thread: Sending values back to opener from user control

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2004
    Posts
    149

    Sending values back to opener from user control

    I have this window(popup) that gets opened from a another window(original). On the popup I have a user control. After the user finishes with the form I would like the values from the usercontrol on the popup to be sent back to the original window.

    But I have no idea how to do it. The javascript that I have to do this from form to form is this:

    window.opener.document.forms[0].txtFieldName.value = document.forms[0].FieldName.value;

    and it works, but not from user control to form which is what i want to fix.

    I also noticed to to get things to work on the user control from page_load of the form that it sits on is something like this:

    Page.RegisterHiddenField("__EVENTTARGET", "UserControl1:btnSearch")

    Where I have to have the name of the usercontrol and then : and then the name of the control.

    Can someone please help me with this please.

    Thanks again.

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Nov 2004
    Posts
    149

    Re: Sending values back to opener from user control

    Nevermind, I fixed my own problem.

    When I looked in the source of the page the id for the controls was:

    UserControl1_txtFieldName

    So i tried this before in the line of code i had before, but i guess that I forgot that javascript is case sensitive, so it works fine now.

    Thanks anyways.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width