I have a Rails web app (Online Examination System). I have disabled Right click, selection, copy etc using JavaScript in the examination interface. So, I want my app to detect whether JavaScript is enabled on interface start up. I have checked it by using <noscript> tag as follows.
<noscript>
<meta http-equiv="refresh" content="5">
<div id="noscript_message" style="color: white; background-color: red;">
It is detected that Javascript is turned off in your web brower. Please turn it on to load the page correctly. For more reference about how to turn it on, please refer <a href="http://www.enable-javascript.com/" target="_blank">
instructions how to enable JavaScript in your web browser</a>.
</div>
</noscript>
But I could only detect and show up a message as warning. My intention is not to load that page and show up the warning message only. How that can be achieved?
Thanks :)-
<noscript><meta http-equiv="refresh" ...></noscript>, but it is damned ugly. You shouldn't disable right click, copy, etc... that is sooo old school...