shricharan bhat shricharan bhat - 1 year ago 68
AngularJS Question

How to close an event on navigating to different Tab or window

Suppose i am trying to make an portal for Online Test on my angular application, And i want close and end the session on navigating (opening new tab or window) to different Window. Is it possible to do so with any JavaScript or J Query function?
Or to restrict users from opening new screen Unless they submit the answers.

Answer Source

You should try blur event:

$(window).blur(function() {
    // end session
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download