Code Snippet
Detect Javascript On/Off, With Notification
<script type="text/javascript">
document.write("Welcome, you have Javascript on.")
</script>
<noscript>JavaScript is off. Please enable to view full site.</noscript>If JavaScript is on the user gets a welcome message. If off, the user is instructed to turn it on.
You could also simply add a link with instructions on how to turn on JavaScript in the noscript tag.
<noscript>For full functionality of this page it is necessary to enable JavaScript. Here are the <a href="http://www.enable-javascript.com" target="_blank"> instructions how to enable JavaScript in your web browser</a></noscript>
@Toni Podmanicki Thanks for the useful link
Nice snippet. Thanks for sharing.
But, isnt it supposed to show the notification on a pop up instead of site upper header?
Thanks
DigWP
A book and blog co-authored by Jeff Starr and myself about the World's most popular publishing platform.
Quotes on Design
Design, like Art, can be an elusive word to define and an awfully fun thing to have opinions about.
HTML-Ipsum
One-click copy to clipboard access to Lorem Ipsum text that comes wrapped in a variety of HTML.
Bookshelf
Hey Chris, what books do you recommend? These, young fertile mind, these.