Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3944336
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:53:17+00:00 2026-05-20T00:53:17+00:00

I am working on a site that will involve a lot of Javascript to

  • 0

I am working on a site that will involve a lot of Javascript to show/hide elements in accordions, as well as other things. I want to make sure that even people that do not have Javascript enabled will be able to access all of the site’s content (even if it is a little less pretty/interactive). I am not sure the best way to go about doing this. I know you can use the tag, but I know that cannot be the best way. It doesn’t make sense to have to essentially have two versions of the site, one for Javascript and one for not.

As I am still building the site, I thought using Apple’s site would be a good example. On any of their product pages (say http://www.apple.com/ipod/) they have their products at the top and then other options (Applications, iTunes & More, etc.) that when you click it shows these next elements. It looks awesome. But if you have Javascript enabled, you no longer get the cool interactive interface, but you do have all the products in a list. How would you go about doing this?

The solution doesn’t necessarily have to be the way that Apple does it. I just thought it was a good example to illustrate what I am trying to do.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T00:53:18+00:00Added an answer on May 20, 2026 at 12:53 am

    You’ll need to Check if browser has javascript enabled. You can use the below function and onload it in your body tag. Based on whether the browser has js enabled or disabled, you can either redirect user to another page or do other things.

    <body onload="checkJs()">
    <div id="jsEnabled" style="visibility:hidden">JavaScript enabled</div>
    <div id="jsDisabled">JavaScript disabled</div>
    
    <script language="javascript" type="text/javascript">
    function checkJs()
    {
    document.getElementById("jsEnabled").style.visibility = 'visible';
    document.getElementById("jsDisabled").style.visibility = 'hidden';
    }
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a simple FAQ page that will show/hide answers on clicked
I am working on a site and working on a component that will take
The site that I am working on is at a remote server. I want
I am working on a Firefox extension that will involve ajax calls to domains
I'm working on a site now that have to fetch users feeds. But how
I have a relatively simple site that I'm working up for an intranet environment.
I have a site that I am currently working on in ASP.NET 2.0 using
I am working on an MVC site that is the first my company has
I have an old ASP.NET 1.1 site that I am maintaining. We are working
I'm developing a site right now that I've been working on for more than

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.