[Javascript] window.close () not catched

Guillaume javascript at webdesignofficina.com
Mon Apr 24 13:41:00 CDT 2006


Nick,

> Guillaume wrote:
>
>> A new window is opened with an inline window.open JavaScript ( 
>> target="_blank"  refuses to pass Xhtml validation).
>> Trying to close this opened window with...
>>
>> <a href="#" onclick="window.close()">Close</a>
>>
>> ... is working fine.
>
>
>> 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...
>
>
> As you haven't posted a link to a testcase I've tried to replicate 
> this (using Safari 2.0.3) and can't.

See my previous mail, I've droped an example. The version of Safari is 
1.3.2. And your example is working as well in this version of Safari.

>
> You can find my test pages at:
> <http://www.nickfitz.co.uk/bugs/browsers/javascript/safari/>
> and see if it gives you any clues as to why it works fine for me but 
> not for you, but without a live example to look at, and details such 
> as which version of Safari, it's not really possible to suggest a fix. 
> Have you tried enabling the Safari Debug menu (if not already enabled) 
> and then enabling "Log JavaScript Exceptions"?

Thanks, never used this... I'll look at this feature...

> If you do that you can look in the console logs to find any JS error 
> messages Safari may be giving you.
>
> Regards,
>
> Nick.


Thanks Nick.

Guillaume.




More information about the Javascript mailing list