Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to disable the close option in the corner of the window.

Status
Not open for further replies.

thendal

Programmer
Aug 23, 2000
284
0
0
Hi all!

Is there any way we can disable the close option in the window.(ie which is in the right hand upper corner of the window )

ThanX

:)
 
I don't think so - this would be a security risk surely, and annoying for the client. There is no reference to any objects like those buttons - you need something like an hta which has full priviledges but itself a security risk. (sorry to go on and on about hta's ;-))
b[sup]2[/sup] - benbiddington@surf4nix.com
 
There must be a way to do this, as I have been to site that open a window with no "chrome" that I can't close except by right clicking on the window on the task bar and using the close option. But ... DON"T DO THIS! I really hate it when it happens and think it's VERY rude!
Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Thanks for the response but still in my application i don't
want my user to close application by mistakely clicking the close button which they will lose the whole data which they have inputed. for a protection i need to disable the close button ,I know when i get into some sites the popup windows its annoying one,
But this application is targeted towards a particular group.

Thendal :)


 
Open a "naked" window (fullscreen, resized if you want to), then the only way of closing it(if you don't add a close feature) is the Alt F4 trick!
Don't think this works in NS though! NS usually insists on keeping those corner options at all times!

;-)
 
IE has an event called onBeforeUnload, that let's you prompt a user before closing a window, to prevent accidental loss of data. It doesn't prevent, but at least it pops up an alert, giving the user a choice whether to cancel the close, or continue to close the window.
 
Another options on the onLoad event open another window of the same thing and pass the data over to it. (This will be very annoying!!)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top