Popup windows and parent

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Belle Shoe
    New Member
    • Jun 2011
    • 1

    Popup windows and parent

    i have a label whose text value does change after closing the pop up window. the label is in the parent window implementing a master page, i would like to know how to fetch the value of the label once the pop up closes, because writing Label1.Text does not give me the new value.. your help will be appreciated and its a lil urgent .. thank u.
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    You need to implement a bit of JavaScript that will go to the server and fetch the new information once the child window closes.

    In the parent window write a method that calls the __doPostback() method for some hidden LinkButton on the page.

    Then, during the JavaScript onBeforeUnload event in the child window call the method you just implemented (to submit the page to the server) using the window.opener property.

    Now in your server-side code, implement a method that handles the LinkButton's click event and set the Label1.Text property then.

    -Frinny

    Comment

    Working...