Is there any way to create a button to enable javascript if a user doesn't have it enabled?
If not, is there another way to enable javascript in the user's browser automatically when they visit our website?
Failing that, can I access the user's browser settings with permission and then enable javascript?
No.
If a user has disabled JavaScript then there is no way for a website to do anything (other then provide instructions (e.g. in <noscript>)) to "help" them turn it on.
Given that people disabling JS are, increasingly, using third party tools (such as NoScript) to do so, providing instructions isn't likely to be helpful anyway. If a user has disabled JavaScript, then it is safe to assume that they understand the consequences of doing so and are capable of finding the On switch for themselves.
JavaScript can fail for other reasons though (such as a network problem while the JS file was downloading), so always be progressive and unobtrusive.
Have you considered using a <noscript> tag?
<noscript>
<div class="bigRedWarningBoxInMiddleOfScreen">
Enable javascript pretty please
</div>
</noscript>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With