Master Page lifecycle

Discussion in 'ASP .Net' started by Guest, Jul 5, 2006.

  1. Guest

    Guest Guest

    I have a popup that does a postback to populate a listbox. on my content
    page I want to fire a jscript that will refresh the parent on the unload. the
    code on the content page looks like this.

    function refreshParent()
    window.opener.location.href = window.opener.location.href;
    if (window.opener.progressWindow)

    <body onunload="refreshParent()">

    Why does the event fire if all i'm doing is doing a search postback?

    Guest, Jul 5, 2006
    1. Advertisements

  2. Guest

    Teemu Keiski Guest

    That's client side onunload and basically from client-side of view when you
    do a postback, you unload the current page and load a new one.

    Per MSDN's documentation following actions cause onunload to fire

    a.. Close the current browser window.
    b.. Navigate to another location by entering a new address or selecting a
    c.. Click the Back, Forward, Refresh, or Home button.
    d.. Click on an anchor that refers the browser to another Web page.
    e.. Invoke the anchor click method.
    f.. Invoke the document write method.
    g.. Invoke the document open method.
    h.. Invoke the document close method.
    i.. Invoke the window close method.
    j.. Invoke the window open method, providing the possible value _self for
    the window name.
    k.. Invoke the window navigate or NavigateAndFind method.
    l.. Invoke the location replace method.
    m.. Invoke the location reload method.
    n.. Specify a new value for the location href property.
    o.. Submit a form to the address specified in the ACTION attribute via the
    INPUT type=submit control, or invoke the submit method.
    Teemu Keiski, Jul 5, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.