• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Intersting showModalDialog question

 
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear friends

When a caller opens a modal dialog window by calling window.showModalDialog(...)

Can the caller close this window also?

if so, can you please tell me how?

Thanks in advance for looking.

-H
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i think so, I normally do not use modal windows, so that is why I am not positive....

var winpop = window.showModalDialog(...);

You can try winpop.close()

Eric
 
Harsha Jay
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Eric Pascarello

Thank you for a quick reply

I tried that and It did not work...

---Harsha
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is going to be no way to do it most likely. I am bad with Modal windows since I really never studied them since they are only IE specific code.

I think modal windows stop the execution of all script on the parent until the window is closed.

Eric
 
Ranch Hand
Posts: 502
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
IIRC, showModalDialog is a blocking call. That means the control wont return to the function that calls showModalDialog unless the dialog closes. So, if you do



The control won't go to the call to close until the dialog closes, and by then the dialog is already closed

Why do you need shoModalDialog? Do you want the popup to be always on top? You can try using showModelessDialog
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic