0

Hi,

On google Chrome there is an event when someone closes the window that merely asks if you really want to leave ONLY.
What i wanted was to know if there is a way in jquery or javascript that enables the logout code to be run on chrome,(or any other way to turn around this problem)
Because in mozilla firefox and internet explorer there is a way to run that code, (the logout code).

Any help will be sincerely appreciated,

the code that i use is this(javascript):

<script type="text/javascript">
  window.onbeforeunload=function (evt){//logout code}
</script>

and it only doesnt work in google Chrome

2
Contributors
4
Replies
7
Views
5 Years
Discussion Span
Last Post by diafol
0

One more question:
How do i differentiate when a page is refreshed from a page/browser closed?
Because it seems that the onbeforeunload event is triggered when a page is refreshed also, and i didnt want that to happen ?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.