Detect Browser Close for Multiple Tabs Window

197 views
Skip to first unread message

nhid

unread,
Mar 15, 2010, 3:29:38 PM3/15/10
to ie7-js
Hello,

I need to detect when the red X button on the browser window is
clicked then do something (logoff the user so the user can re-enter).
I have tried "onbeforeunload" event but it works only when the browser
has a single tab because it meets the condition "window.event.clientY
< 0". However, when there are multiple tabs and user needs to respond
to "Do you want to close all tabs" alert, window.event.clientY is no
longer negative. This is for IE 7.

Any suggestions?

Thank you.

Christian Jarhult

unread,
Mar 16, 2010, 4:26:58 PM3/16/10
to ie7...@googlegroups.com
Hi!

I don't have an answer to your question. I'm just the boring person telling off people that post off-topic messages... :)

I'd just like to inform you that this mailing list is for topics around the javascript library "ie7-js", not the browser itself or other browser-specific javascript. Saying that, I don't want to discourage anyone to suggest a solution for your problem -- the only thing I'm saying is that chances are small that someone here have a solution for you. You will probably be better off posting in forums like e.g. webdeveloper.com.

Good luck!


2010/3/15 nhid <nhi...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "ie7-js" group.
To post to this group, send email to ie7...@googlegroups.com.
To unsubscribe from this group, send email to ie7-js+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ie7-js?hl=en.


Dean Edwards

unread,
Mar 16, 2010, 4:55:02 PM3/16/10
to ie7...@googlegroups.com
On 16/03/2010 20:26, Christian Jarhult wrote:
> Hi!

>
> I'm just the boring person telling off people that post off-topic
> messages... :)
>

You do sterling work and I'm very grateful for it! :)

-dean

Reply all
Reply to author
Forward
0 new messages