closing parent after pop up appears

Discussion in 'ASP .Net' started by sramruttun, Aug 6, 2003.

  1. sramruttun

    sramruttun Guest

    hi

    I open a pop up window using window.showModalDialog. How can I close the
    parent window after the pop up appears ?
     
    sramruttun, Aug 6, 2003
    #1
    1. Advertisements

  2. sramruttun

    Daniel Bass Guest

    window.showModalDialog(...)
    window.close();

    will first launch your window, then close itself....

    "sramruttun" <> wrote in message
    news:...
    > hi
    >
    > I open a pop up window using window.showModalDialog. How can I close the
    > parent window after the pop up appears ?
    >
    >
     
    Daniel Bass, Aug 6, 2003
    #2
    1. Advertisements

  3. sramruttun

    Saravana Guest

    Saravana, Aug 6, 2003
    #3
  4. Hi

    You cant close the opener if you use a dialog until the dialog closes
    use window.open instead.....

    --
    Best Regards
    Vidar Petursson
    ==============================
    Microsoft Internet Client & Controls MVP
    ==============================
    "sramruttun" <> wrote in message
    news:...
    > hi
    >
    > I open a pop up window using window.showModalDialog. How can I close the
    > parent window after the pop up appears ?
    >
    >
     
    Vidar Petursson, Aug 6, 2003
    #4
  5. sramruttun

    sramruttun Guest

    thanks everyone for your replies
    Daniel said:
    window.showModalDialog(...)
    window.close();
    well I had tried this but it does not work..

    Saravana is suggesting an article on how to close the POP UP WINDOW while I
    want to close the parent (opener)

    Vidur said that the opener can't be closed if you use a dialog until the
    dialog closes
    use window.open instead.....

    I too thought that when showModalDialog is used, the parent can't be closed.
    I'll need to use window.open.

    But is there still a workaround to achieve it using showModalDialog?






    "sramruttun" <> wrote in message
    news:...
    > hi
    >
    > I open a pop up window using window.showModalDialog. How can I close the
    > parent window after the pop up appears ?
    >
    >
     
    sramruttun, Aug 7, 2003
    #5
  6. sramruttun

    sramruttun Guest

    ok Jerry
    But what's the main difference between showModelessDialog and
    showModalDialog ?
    Both seem to be modal.

    "Jerry III" <> wrote in message
    news:...
    > No there isn't, you can't close a window from a modal dialog it owns since
    > the parent doesn't process user input until the modal dialog closes

    (that's
    > the difference between modal and modeless dialog). You should be able to

    use
    > showModelessDialog instead of window.open if you want to.
    >
    > Jerry
    >
    > "sramruttun" <> wrote in message
    > news:...
    > > thanks everyone for your replies
    > > Daniel said:
    > > window.showModalDialog(...)
    > > window.close();
    > > well I had tried this but it does not work..
    > >
    > > Saravana is suggesting an article on how to close the POP UP WINDOW

    while
    > I
    > > want to close the parent (opener)
    > >
    > > Vidur said that the opener can't be closed if you use a dialog until the
    > > dialog closes
    > > use window.open instead.....
    > >
    > > I too thought that when showModalDialog is used, the parent can't be

    > closed.
    > > I'll need to use window.open.
    > >
    > > But is there still a workaround to achieve it using showModalDialog?
    > >
    > >
    > >
    > >
    > >
    > >
    > > "sramruttun" <> wrote in message
    > > news:...
    > > > hi
    > > >
    > > > I open a pop up window using window.showModalDialog. How can I close

    the
    > > > parent window after the pop up appears ?
    > > >
    > > >

    > >
    > >

    >
    >
     
    sramruttun, Aug 7, 2003
    #6
  7. Hi

    http://msdn.microsoft.com/library/d...html/reference/methods/showmodelessdialog.asp
    The dialog will close when opener closes.... use window.open ;-)

    --
    Best Regards
    Vidar Petursson
    ==============================
    Microsoft Internet Client & Controls MVP
    ==============================
    "sramruttun" <> wrote in message
    news:...
    > ok Jerry
    > But what's the main difference between showModelessDialog and
    > showModalDialog ?
    > Both seem to be modal.
    >
    > "Jerry III" <> wrote in message
    > news:...
    > > No there isn't, you can't close a window from a modal dialog it owns

    since
    > > the parent doesn't process user input until the modal dialog closes

    > (that's
    > > the difference between modal and modeless dialog). You should be able to

    > use
    > > showModelessDialog instead of window.open if you want to.
    > >
    > > Jerry
    > >
    > > "sramruttun" <> wrote in message
    > > news:...
    > > > thanks everyone for your replies
    > > > Daniel said:
    > > > window.showModalDialog(...)
    > > > window.close();
    > > > well I had tried this but it does not work..
    > > >
    > > > Saravana is suggesting an article on how to close the POP UP WINDOW

    > while
    > > I
    > > > want to close the parent (opener)
    > > >
    > > > Vidur said that the opener can't be closed if you use a dialog until

    the
    > > > dialog closes
    > > > use window.open instead.....
    > > >
    > > > I too thought that when showModalDialog is used, the parent can't be

    > > closed.
    > > > I'll need to use window.open.
    > > >
    > > > But is there still a workaround to achieve it using showModalDialog?
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    > > > "sramruttun" <> wrote in message
    > > > news:...
    > > > > hi
    > > > >
    > > > > I open a pop up window using window.showModalDialog. How can I close

    > the
    > > > > parent window after the pop up appears ?
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Vidar Petursson, Aug 7, 2003
    #7
    1. Advertisements

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. buran
    Replies:
    1
    Views:
    6,259
    Dimitri Glazkov
    Dec 29, 2004
  2. =?Utf-8?B?Vk1J?=

    Closing popup window when closing parent window?

    =?Utf-8?B?Vk1J?=, Feb 14, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    716
    Thomas Hansen
    Feb 15, 2007
  3. Mason Kelsey
    Replies:
    5
    Views:
    130
    Mason Kelsey
    Sep 27, 2009
  4. thomas
    Replies:
    0
    Views:
    293
    thomas
    Oct 23, 2003
  5. piggy
    Replies:
    4
    Views:
    107
    piggy
    Dec 21, 2005
Loading...

Share This Page