How to Prompt Users to Enable Javascript

How to Prompt Users to Enable Javascript thumbnail
You can prompt a user to enable JavaScript, but they may not do it.

HTML is not a coding language. It is limited in functionality and cannot add interactivity to a web page. JavaScript, on the other hand, enables developers to add animation, form processing and other functionality to a website. Unfortunately, some Internet users disable JavaScript in their browsers. If your web page cannot function without JavaScript, these users will not experience your page as you designed it. You cannot use JavaScript to determine if JavaScript is disabled, but you can still prompt a user to enable it.

Instructions

    • 1

      Open the HTML document that contains your web page.

    • 2

      Add the following JavaScript code to the <script> section of the document:

      <noscript>Please Enable JavaScript</noscript>

      Any browser with JavaScript enabled will display the contents of a no-script tag. Change the text of the message to suit your website.

    • 3

      Save the HTML file and open it in your browser. If your browser has JavaScript enabled, you will not see the message prompt.

    • 4

      Disable JavaScript in your Browser and press "F5" to refresh the browser. You will see the message prompt.

Tips & Warnings

  • "Graceful Degradation" is the practice of not relying on JavaScript to perform critical web page functionality. Try to adhere to this principle when developing web pages. This will make your website accessible to all users, even if they disable JavaScript in their browsers.

Related Searches:

References

Resources

  • Photo Credit typing girl image by Andrey Kiselev from Fotolia.com

Comments

You May Also Like

Related Ads

Featured