Closing popup window when closing parent window?

Discussion in 'ASP .Net' started by =?Utf-8?B?Vk1J?=, Feb 14, 2007.

  1. How can I close popup window automatically when I close the parent window
    (the application itself)?

    Thanks.
     
    =?Utf-8?B?Vk1J?=, Feb 14, 2007
    #1
    1. Advertising

  2. =?Utf-8?B?Vk1J?=

    Mark Rae Guest

    "VMI" <> wrote in message
    news:...

    > How can I close popup window automatically when I close the parent window
    > (the application itself)?


    That will depend how you've launched the popup - post your code...
     
    Mark Rae, Feb 14, 2007
    #2
    1. Advertising

  3. =?Utf-8?B?Vk1J?=

    bruce barker Guest

    when you create a popup, it returns a window handle. save this handle,
    and in the body onunload event close it.

    <script>var popup = null;</script>
    <body ononload="if(popup) popup.close();">


    -- bruce (sqlwork.com)

    VMI wrote:
    > How can I close popup window automatically when I close the parent window
    > (the application itself)?
    >
    > Thanks.
     
    bruce barker, Feb 14, 2007
    #3
  4. On Feb 14, 5:48 pm, bruce barker <> wrote:
    > when you create a popup, it returns a window handle. save this handle,
    > and in the body onunload event close it.
    >
    > <script>var popup = null;</script>
    > <body ononload="if(popup) popup.close();">


    Or even better ;)
    http://ajaxwidgets.com/AllControlsSamples/Window.aspx

    ..t
     
    Thomas Hansen, Feb 15, 2007
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U2lsZWVzaA==?=
    Replies:
    4
    Views:
    33,916
    =?Utf-8?B?U29sZWwgU29mdHdhcmU=?=
    Oct 14, 2004
  2. Urs Gubler
    Replies:
    0
    Views:
    155
    Urs Gubler
    Jul 2, 2003
  3. janne
    Replies:
    0
    Views:
    186
    janne
    Aug 20, 2003
  4. thomas
    Replies:
    0
    Views:
    229
    thomas
    Oct 23, 2003
  5. Jens Peter Hansen
    Replies:
    7
    Views:
    544
    Randy Webb
    Jun 19, 2004
Loading...

Share This Page