Click to See Complete Forum and Search --> : How to make a windor quit without asking user?


Parka
01-03-2004, 06:36 AM
I have a button named "quit"

What's the code for the button so that when the user presses it, it will close without asking the user for "Is it okay to close this window?"

I want it to close immediately after the button is clicked.

Thanks a lot!
Parka

PS: I'm a javascript dummy.

Mr J
01-03-2004, 06:49 AM
Please try the following

Function closewin(){
window.opener = top;
window.close()
}

fredmv
01-03-2004, 06:58 AM
Originally posted by Mr J
FunctionJust to avoid any confusion, that "F" should be lowercase (remember that JavaScript is case-sensitive).

Parka
01-03-2004, 08:05 AM
Thanks guys,

I'll be looking into it!

Mr J
01-03-2004, 01:58 PM
Oops!! silly me

:eek: