Methods to get a reference to a child window

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • SteveKlett@gmail.com

    Methods to get a reference to a child window

    I'm using a on-demand, SaS ERp application. I would like to customize
    a few aspects of the application and I can as they have the ability to
    "deploy" custom scripts with the served up pages.

    One of the things that the page does it open a popup child window. I
    can't directly hook into this process and get a reference to the
    popped window, but I need to.

    Are there any techniques to detect when a window opens another window?

    It looks like the Window object doesn't have a collection of child
    Windows, so I can't check that.. I really don't know what other
    options there are.

    I found one thread on google that covers this question and the answer
    was "no" but it was pretty old thread, maybe something has changed?

    In a nutshell, I need to detect when a new window opens up. Is that
    possible and if so... can you give me some hints how it's
    accomplished?

    Thanks,
    Steve
  • Joost Diepenmaat

    #2
    Re: Methods to get a reference to a child window

    "SteveKlett@gma il.com" <SteveKlett@gma il.comwrites:
    In a nutshell, I need to detect when a new window opens up. Is that
    possible and if so... can you give me some hints how it's
    accomplished?
    *if* the script opens a new window using window.open(), you *might* be
    able to replace that method with something of your liking:

    var oldopen = window.open;
    function open() {
    var win = oldopen.apply(w indow,arguments );
    // do something here
    return win; // return to calling code
    }

    This is completely untested and unresearched code.

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

    Comment

    • Joost Diepenmaat

      #3
      Re: Methods to get a reference to a child window

      "SteveKlett@gma il.com" <SteveKlett@gma il.comwrites:
      So I would basically be hijacking the built in method, I like it! ;0)
      >
      Thanks for the suggestion, I will check this out.
      It should work, the main issue is that AFAIK browsers *may* make those
      methods read-only. I'd be interested to know if it works on the usual
      systems :-)

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

      Comment

      • Laurent vilday

        #4
        Re: Methods to get a reference to a child window

        Thomas 'PointedEars' Lahn a écrit :
        Joost Diepenmaat wrote:
        >I'd be interested to know if it works on the usual systems :-)
        >
        I wouldn't.
        Do you really think anyone care about what you are or not interested ?

        Please get real and go consult a psychiatrist while you are at it !

        --
        laurent

        Comment

        Working...