By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,016 Members | 1,285 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,016 IT Pros & Developers. It's quick & easy.

Disable Modal Window Close?

P: n/a
Is there a way to temporirly disable the X button (close) on a MODAL window
in the web browser? We have cleanup code that needs to run after the user
closes the modal window. This works fine if the user closes the window via a
button I have placed on the page. If the user tries to close the window via
the "X", then popup blockers potentially pervent then cleanup window from

Right now, clicking the X fires off the ONBEFOREUNLOAD java event. Maybe, is
there a way to trap when the "X" is clicked and notify the user to close
using the button instead.

I know you can do this on a Windows form, but I need to do it from browser
windows that are MODAL windows.
..NET Software Developer
Mar 8 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.