General > Support

logout on window close

<< < (2/2)

von1:

--- Quote from: florin.serban on January 29, 2010, 07:03:44 AM ---First of all you should download the JQuery library. Once it has downloaded save it in the "webim/js" folder. Rename it to "jquery.js".

--- End quote ---

Rather use the included one in 1.6.4

<script type="text/javascript" language="javascript" src="${webimroot}/js/jquery-1.3.2.min.js"></script>


Excellent post.

indedmedia:
I tried to do all steps here, but to me don“t work :(, can anyone help me?
I need it.

nirpan:

--- Quote from: pochimen on February 22, 2010, 09:46:22 PM ---Your solution seems logic, however it does not work for me, i've checked everything (Script, JQuery, etc), no activity when the user click the window close button.

Here I post my solution.

Search the line:
<a class="closethread"  id="close" href="javascript:void(0)" onClick="return false;" title="${msg:chat.window.close_title}"><img src="${tplroot}/images/buttons/close.gif" border="0" alt="${msg:chat.window.close_title}"/></a>

add the id="close" (as seen above)


then add the following script on top

<script type="text/javascript">

window.onbeforeunload = function() {
    document.getElementById('close').click();

</script>

}

Hope this helps!

--- End quote ---

It did! Thanks for that!

Navigation

[0] Message Index

[*] Previous page

Go to full version