Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] window.close () not catched
- From: nick at nickfitz.co.uk (Nick Fitzsimons)
- Subject: [Javascript] window.close () not catched
- Date: Mon Apr 24 15:12:16 2006
Guillaume wrote:
>
> Thanks Nick.
>
> Guillaume.
No problem. FWIW I tested your page and Safari didn't give any error
message, and didn't close the window with the second page loaded :-(
So I'm not sure what's going on, and unfortunately I'm pretty busy so
can't really look into it at the moment.
One possible way of investigating is to assign an id attribute to the link:
<a href="#" onclick="window.close();return false;" id="testLink">
which would then allow you to type the following into the location bar:
javascript:alert(document.getElementById("testLink").onclick.toString())
which would allow you to see if the link is actually losing its click
event handler, or what. If you get an alert saying
"window.close();return false;" then try:
javascript:void(document.getElementById("testLink").click())
and see if the window closes. If so the implication is that somehow the
click is being blocked from getting through to the button - maybe a
layout problem...
HTH,
Nick.
--
Nick Fitzsimons
http://www.nickfitz.co.uk/
- References:
- [Javascript] window.close () not catched
- From: Guillaume
- [Javascript] window.close () not catched
- From: Nick Fitzsimons
- [Javascript] window.close () not catched
- From: Guillaume
- [Javascript] window.close () not catched
- Prev by Date: [Javascript] window.close () not catched
- Next by Date: [Javascript] Memory leaks?
- Previous by thread: [Javascript] window.close () not catched
- Next by thread: [Javascript] Check boxs and table row back ground colors
- Index(es):