Paramesh Reddy Paramesh Reddy - 1 year ago 117
HTML Question

How to completly disable back button of a browser while taking online exam?

In online examination once candidate has clicks on start button i dont want to allow him to go back (to previous pages) and he should be in same page if he do any activities by using browser properties.Once he click on the submit button he is coming out of that page.

Here if i clear the cache and press the browser back button the page says as "Document Expired The requested document is not available in Firefox's cache." Therefore i dont want to clear cach insted i need to competly disable back button ie nothing should happen on clicking the back button.

if anybody knows let me know how to achieve this concept......

Answer Source

Try this script

window.location.hash="Again-No-back-button";//again because google chrome don't insert first hash into history

Also refer this link. This link contain demo & Download code

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download