This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Grokking Bitcoin and have Kalle Rosenbaum on-line!
See this thread for details.
Win a copy of Grokking Bitcoin this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

how to handle showModal dialog's X button?  RSS feed

 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ranchers,
I am using window.showModalDialog in my application,in that when submitted an action, the process takes some time to complete successfully,during the process the user is closing the window,by clicking dialog's "X" button.

How can I avoid user to use 'X' button, I want user to wait until the process completes,at present a Please wait...screen is being shown,but that is not useful as he closes the window using 'X' button.

Iam eagerly looking for some really good solution,
Thank you friends.

ramana.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can not block it.

Have you looked into onbeforeunload?

Eric
 
Ramna Reddy
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Eric,
First of all,
For all:Wish you happy new Year

Yes Eric,I have seen onbeforeunload,I knew,we can't restrict user of his rights.But, I am asking any alternative solution for this kind of problem?
anybody might have faced this,I would like to know,how they solved?

thanks,
ramana.
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is nothing you can really do other than stand there and hold the user's hand.

You can avoid modal windows and use an iframe in the parent page. Absolutely position it and do your work in there.

Eric
 
Ramna Reddy
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

The reason for using Modal window is not to give access to underlying parent window.

ramana
 
grapes are vegan food pellets. Eat this tiny ad:
ScroogeXHTML - the small and fast RTF to HTML converter library
https://coderanch.com/t/707504/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!