Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] window.close () not catched


  • From: david at dorward.me.uk (David Dorward)
  • Subject: [Javascript] window.close () not catched
  • Date: Mon Apr 24 09:19:25 2006

On Mon, Apr 24, 2006 at 04:15:12PM +0200, Guillaume wrote:
> A new window is opened with an inline window.open JavaScript ( 
> target="_blank"  refuses to pass Xhtml validation).

Because you are using XHTML 1.0 Strict and it doesn't include a target
attribute?

> Except in Safari: this browser allows the window.close only when the 
> window is opened first.
> If you browse to the second image inside this window the window.close 
> does not work anymore...
> 
> Any idea why ?

Presumably it ties the security to the document you open rather than
just the window, so a different document doesn't have the authority to
close the window.
 
> Any fix ?

Get rid of the JavaScript and decide user's already know how to close
windows - since they can do it for every other window on their system?

-- 
David Dorward                                      http://dorward.me.uk