0

I had Created an Online Test Application. In which I have to give a functionality that is, If some one changes its browser tab or minimize its window,test will get submitted.

I checked on google.Their I saw onchange and onblur event but I am unable to locate code for this.

Will you guys please share your opinion on this and can share code as well.

Thanks Mayur Nabeda

Mayur Nabeda
  • 1
  • 1
  • 1
  • You can check user activity on your page for some time (as per your requirement) and if user is not active then trigger test to submit! – Deepak Biswal Oct 01 '15 at 06:51

1 Answers1

1

One way is to check whether a browser window is currently active or Not ? if window is not active You can prompt a warning box that would ask the student to return focus to the window.and terminate the exam if the student still opts switching tab.Here is link to check browser window Active

Community
  • 1
  • 1
Krsna Kishore
  • 8,233
  • 4
  • 32
  • 48