close.windows()

T

Tim Van Wassenhove

Can i close a windows without the question that do i want to close it?

You can close your windows, but not mine. Certainly not without asking
me. And let's keep it that way :)
 
P

Pal Csepregi

Ok but i want to close my windows after i opened another. is there any
chance to close it whitout that stupid wquestuion?

Pal
 
L

Lasse Reichstein Nielsen

Please don't top post.
Ok but i want to close my windows after i opened another. is there any
chance to close it whitout that stupid wquestuion?

It's not your window unless you opened it. Closing the main window of
the browser also loses its history. That is why you are not allowed
to close it, even though it is currently showing your page.

/L
 
M

Michael Winter

Pal Csepregi wrote on 22 Nov 2003:
Ok but i want to close my windows after i opened another. is
there any chance to close it whitout that stupid wquestuion?

No, you can't. If the user asks, through settings in their browser,
to be warned if a script tries to close a window you, as an author,
have no right to over-ride that decision.

I think what Mr Wassenhove* tried to say was a lot of users do not
wish to be 'violated' in that way, and nothing should be done to
change current browser behaviour.

You'll just have to live with the warning.

Mike


* Apologies if I'm putting words in your mouth.
 
M

Michael Winter

Michael Winter wrote on 22 Nov 2003:
No, you can't. If the user asks, through settings in their
browser, to be warned if a script tries to close a window you,
as an author, have no right to over-ride that decision.

Correction: it has nothing to do with browser preferences (though
some might use them). It is part of the behaviour of the
window.close() method.

Mike
 
F

find clausen

Can i close a windows without the question that do i want to close it?

If you see the question it's NOT a window,
it's the browser itself. (maybe you came in from a search engine)

Then it's a page that was intended to be opened as a window
with window.open or _blank etc.
 
D

DU

Michael said:
Michael Winter wrote on 22 Nov 2003:




Correction: it has nothing to do with browser preferences (though
some might use them). It is part of the behaviour of the
window.close() method.

Mike

Even that is starting to change too. I reported a bug on this issue for
Opera 7. Scripts might not have the rights to close windows, even those
created by javascript. It's generally perceived as rude, excessive
powers over the browser. Idem est: the user wants to position or resize
an enlarged image in a requested popup but a script detects a mouse
clicks and then closes the window: quite stupid IMO.

Mozilla will have (or already has) an user pref by which you can disable
windowRef.close() calls.

Firebird 1.0 will have it as an UI pref:
+ <checkbox id="allowCloseWindow"
label="&allowCloseWindow.label;"
prefstring="dom.allow_scripts_to_close_windows"/>

user_pref("dom.allow_scripts_to_close_windows", false);

DU
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top