maintain opener property after refresh/reload of popup

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bruce

    maintain opener property after refresh/reload of popup

    I have an application where a main window opens a popup window. Within
    the popup, I want to be able to post a form back to the popup all the
    while maintaining the opener property.

    Of course, once the popup window re-loads itself by posting a form to
    itself, all Javascript state information is lost and so opener is
    undefined.

    Is there any way I can communicate with the original opener of a popup
    window once the popup window has been reloaded?

    Since opener is an object, it's not like I can simply include opener
    in the posted form.

    Is there some way I can use the window name of the opener to
    communicate with the opener once the popup is refreshed?

    I realize I could probably get around this with some clever usage of
    Ajax so that the popup window content is refreshed without actually
    reloading the page but I'm hoping there is some simpler trick I've
    overlooked.
  • Joost Diepenmaat

    #2
    Re: maintain opener property after refresh/reload of popup

    Bruce <batman42ca@yah oo.cawrites:
    Of course, once the popup window re-loads itself by posting a form to
    itself, all Javascript state information is lost and so opener is
    undefined.
    Are you sure about that?

    --
    Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/

    Comment

    • Bruce

      #3
      Re: maintain opener property after refresh/reload of popup

      On Oct 6, 10:05 am, Joost Diepenmaat <jo...@zeekat.n lwrote:
      Bruce <batman4...@yah oo.cawrites:
      Of course, once the popup window re-loads itself by posting a form to
      itself, all Javascript state information is lost and so opener is
      undefined.
      >
      Are you sure about that?
      >
      --
      Joost Diepenmaat | blog:http://joost.zeekat.nl/| work:http://zeekat.nl/
      Well, I create a popup, use opener.someFunc Name() to run code in the
      parent window. That works fine. If I allow the popup to post back to
      itself and then try opener.someFunc Name(), opener has no properties.

      Should I be able to post a form from a popup back to the popup and
      still maintain the opener property?

      Comment

      • Bruce

        #4
        Re: maintain opener property after refresh/reload of popup

        On Oct 6, 10:05 am, Joost Diepenmaat <jo...@zeekat.n lwrote:
        Bruce <batman4...@yah oo.cawrites:
        >
        Are you sure about that?
        >
        Seems it was something else. When I reduced my code down to the
        simplest test, it works. It seems opener does survive a POST
        operation. I was passing the name of the main function to be called by
        the popup to the popup when the window was created and I failed to
        include that function name in the POSTed form. It was the function
        name that was not being preserved, not the opener property.

        Problem solved.

        Comment

        Working...