-1

I am developing a on line assessment test site and want to provide security, if user minimizes the browser or open a new tab an continuous alert have to come. Please help out this.

Thank you in advance...strong text

Mohit
  • 1
  • 1
    How would you know User Open a New Browser? From your web site its not possible to get what user is doing in his/her machine ..Are you going to Hack the user machine? – Subodh Joshi Jul 22 '15 at 06:55
  • Have a look at http://stackoverflow.com/questions/1060008/is-there-a-way-to-detect-if-a-browser-window-is-not-currently-active – Kennet Jul 22 '15 at 07:00
  • What technologies are included in your page? JavaScript, (deprecated) Java applets, (deprecated) Flash applets? Applets are the only way to have some insight on the user's machine, but for this precise reason, they are security threats and are more and more regarded as something not to be used. For JavaScript, well, Subodh Joshi said it all. – Chop Jul 22 '15 at 07:09

2 Answers2

0

You can do this through Javascript. Please take a look at this API: http://www.w3.org/TR/page-visibility/ Someone asked a similar question:

Is there a way to detect if a browser window is not currently active?

Community
  • 1
  • 1
Miki
  • 103
  • 1
  • 11
0

To know if a new window/tab is opened,

use onblur for the top most frame. [window.top]

window.top.onblur = function() { alert() }

for resize, window.onresize should do the job.