Identify if user has javascript enabled, if not create a button that would install it

Posted on 2009-04-22
Last Modified: 2012-05-06
I am building an app that needs the user to have javascript installed and enabled. Can i create a web page that finds out if they have javascript, then if they dont, bring up a page where they can download and install it. I would like this to be internal so no internet is required, therefore for the installation files of javascript to be embedded into my app or the html page.

Can this be done

The html pages are offline ones
Question by:nathan1038
    LVL 31

    Expert Comment

    If JS is not installed you can't use JS to detect and create a button

    Author Comment

    What i am looking for is, to find out if js is installed. If not, then like firefox, it tells you, javascript not installed and would you like to install it  - could i do that
    LVL 14

    Expert Comment

    You can only tell the user that their browser don't support JavaScript by using the code below. You cannot install JavaScript, as it comes with the browser, which means they have to download and install a modern browser like FireFox.
    <noscript>Your browser doesn't support JavaScript! You will need to download and get a modern browser like FireFox!</noscript>

    Open in new window

    LVL 19

    Accepted Solution

    "Can this be done?", no - because you're misinformed about javascript. As sam2912 says, javascript is a core feature of modern browsers.

    I wouldn't care to find out how many versions you would have to go back to find browsers without javascript support. However it's long enough to make it safe to assume that your site's visitors will have js capable browsers. The problem will be whether they have it enabled or not.

    The <noscript></noscript> tag's purpose is to display the content within when js is disabled or not supported. To enforce js enabled, you can use a meta redirect in noscript tags on your app pages: -

    <meta http-equiv="refresh" content="0;URL=please_enable_javascript.html" />

    Create a webpage with your 'Please enable javascript.' message and put it's url into the meta tag above. Obviously this code belongs in the <head> of the app documents.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Suggested Solutions

    Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
    This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
    In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
    The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now