closing parent after pop up appears

  • Thread starter Thread starter sramruttun
  • Start date Start date
S

sramruttun

hi

I open a pop up window using window.showModalDialog. How can I close the
parent window after the pop up appears ?
 
window.showModalDialog(...)
window.close();

will first launch your window, then close itself....
 
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
==============================
 
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?
 
ok Jerry
But what's the main difference between showModelessDialog and
showModalDialog ?
Both seem to be modal.
 
Back
Top