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

  • SEARCH
  • Home
  • 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 6736239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:06:24+00:00 2026-05-26T11:06:24+00:00

I have a question… I have a website developed especially for Chrome , and

  • 0

I have a question…

I have a website developed especially for Chrome, and i want to show a notification (for say people use Google Chrome) only to user they’re not using Chrome. I think it should be like this on Javascript:

var isChrome = navigator.userAgent.indexOf("Chrome/") > -1;

if (isChrome) {
document.getElementById('notification').style.display = 'none';
}

but when I did this, I got an error ( in Google Developer Inspector: JS Console) saying this:

Uncaught TypeError: Cannot read property ‘style’ of null

so what am I doing wrong¿?

Thanks in advance.

PD. Sorry for my English, I speak a little of it!

  • 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-26T11:06:24+00:00Added an answer on May 26, 2026 at 11:06 am

    You’re probably trying to run that code before your whole HTML is read into a DOM. Register it as an event handler for the “load” or “ready” events. (The best way to do this depends on whether you’re using a Javascript framework or just pure JS.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have question from programming pearls problem is following show how to use Lomuto's
I have question regarding the use of function parameters. In the past I have
I have question concerning a function I created. I would like to show the
i have question about why should we use return in get,if dont use what
I have question to Java or C# programmers. I want to render some pages
I have question about integrate Open office with PHP. I want make mail merge
I have question about 301 Redirect please: example: http://stackapp.com/post/35642 to: http://google.com/posts/index.php?q=http://stackapp.com/post/35642 Note: I want
I have question: when I to use <%= ConfigurationManager.AppSettings[xxx] %> and <%$ AppSettings: xxx
I have question for you ... I have UITableView and I want to catch
I have question on controlling the amount of concurrent threads I want running. Let

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.