Click to See Complete Forum and Search --> : Window close button??


Epadeam
06-19-2003, 07:53 AM
Hi all,

Is there a way to get rid of the X button at the top right of a window??? I know I can open a new window with no minimise or maximise buttons but I can't get rid of the close button.

Does anyone know if this is possible?

Thanx for any help

pyro
06-19-2003, 07:59 AM
The only way is with a chromeless window, which does not work in XP with SP1 or later: http://www.dynamicdrive.com/dynamicindex8/chromeless.htm

Epadeam
06-19-2003, 08:02 AM
Hmmm, yeah I used a chromless one before, it caused loads of problems. Ok if I can't get rid of the close button is there any way to disable it??

pyro
06-19-2003, 08:04 AM
Fortunatly, no, there is not. ;)

Epadeam
06-19-2003, 08:14 AM
Do'h, :(

The problem I got is that I need to execute specific code when a page is closed, mupet users just tent to hit the X button instead of using the on screen close. Do you know of any events that I can use on this button to do this??

pyro
06-19-2003, 08:18 AM
There might be some options that would work in IE, using onbeforeunload. What exactly do you need to do?

Epadeam
06-19-2003, 08:28 AM
The exact code depends on the page, usually they will call cgi actions or stored procs. I remember using onbeforeunload somewhere, ill look into that. :)

Thanx