window.opener

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

    window.opener

    Hi,

    Does anyone here know of a way of tracking the window that launched a popup
    window besides using window.opener? The problem i'm having is that the
    popup window submits a form within itself before wanting to return the data
    to the launching page, and unfortunately in IE5 window.opener is undefined
    after the form is submitted, so i need some sort of workaround to make the
    page work in IE5.
    Thanks,

    Daniel
  • Peter

    #2
    Re: window.opener

    Call a function within the opener (on Clicking a submit image or something
    on your pop up window) which pulls the data into itself then submits the
    form of the pop up page, then closes the pop up page.

    E.G.
    Put this in your opener page...

    var popUp;

    function openPopUp(strPa ge) {
    popUp = window.open(str Page, etc,etc...
    }

    function finishIt() {
    var x = popUp.document. form.txtField1. value;
    var y = popUp.document. form.txtField2. value; etc, etc

    popUp.document. form.submit();

    popUp.close();
    }

    Put this in your pop up page...

    <a href="javascrip t:window.opener .finishIt();">< img
    src="submit.gif "></a>

    Hope that helps you.

    Peter.

    "Daniel Andersen" <daniela@itconn ect.net.au> wrote in message
    news:3f1392e7_1 @news.brisbane. pipenetworks.co m...[color=blue]
    > Hi,
    >
    > Does anyone here know of a way of tracking the window that launched a[/color]
    popup[color=blue]
    > window besides using window.opener? The problem i'm having is that the
    > popup window submits a form within itself before wanting to return the[/color]
    data[color=blue]
    > to the launching page, and unfortunately in IE5 window.opener is undefined
    > after the form is submitted, so i need some sort of workaround to make the
    > page work in IE5.
    > Thanks,
    >
    > Daniel[/color]


    Comment

    Working...