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 887563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:14:57+00:00 2026-05-15T13:14:57+00:00

I have page like this <html> <head> <div id=container> Hello, this is NON-IE content.

  • 0

I have page like this

<html>
<head>

<div id="container">
Hello, this is NON-IE content.
</div>

</head>
</html>

What I want is to Stop Internet Explorer [ IE ] from loading OR Neglecting <div id="container"> & allow all other browsers to load It.

Don’t want to use <!--[if IE 7]>.

Looking for Javascript to work with.

How Can I achieve this ?

Thanks

  • Mandar
  • 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-15T13:14:58+00:00Added an answer on May 15, 2026 at 1:14 pm

    For users that don’t want to use jQuery, you can simply do:

    if (/*@cc_on!@*/false) {
        alert('This is Internet Explorer!');
    }
    

    http://devoracles.com/the-best-method-to-check-for-internet-explorer-in-javascript

    What we see up there? I declared a new
    variable, called IE, which has the
    value a comment block followed by
    ‘false‘. The above variable will be
    understood by IE: var IE = !false,
    because Internet Explorer uses JScript
    — a Javascript-like dialect of the
    standard ECMAScript — instead of
    Javascript which is used by all the
    other browsers. JScript can parse the
    comments, just like Internet Explorer
    (see conditional HTML comments post).
    This is a unique feature of IE, none
    of the other browsers can do it, so
    Firefox, Chrome, Safari, Opera, all
    will understand the above declaration
    as IE = false.

    Note: If any other browser were to use “JScript” this would pass, but since JScript is written by Microsoft I think you’re safe. Another method is the navigator object, which you can pull the application name. Although some applications like to spoof this, so I believe the JScript is a bit more reliable.

    if (navigator.appName == 'Microsoft Internet Explorer') {
        alert('This is Internet Explorer!');
    }
    

    Edit: This was more to help users in detecting IE, not about directly answering the users question. Also, for users not wanting to use jQuery you could simple do document.getElementById(‘container’).style.display = ‘none’; — Just figured I’d add this in since my post did mention “without using jQuery”.

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

Sidebar

Related Questions

I have the following index.html page set-up: <html> <head> </head> <body> <div id=container> <div
I have a html page like this <html xmlns=http://www.w3.org/1999/xhtml> <head> <script src=JScript2.js type=text/javascript></script> <script
I have a page like this: <html> <head> <script language=javascript type=text/javascript src=jquery-1.4.2.min.js></script> <script language=javascript
a) I have an html page that looks like this: <html> <head> <title>Page Title</title>
I have an HTML doc that looks roughly like this: <html> <head><title>Example</title></head> <body> <div
i have script like this.... <head> <meta http-equiv=content-type content=text/html; charset=iso-8859-1 /> <meta name=author content=bbbbb
I have this script on my html page: <script language='javascript'>parent.resizeTo(550,510);</script> I'd like to add
I have an Asp .net page like this simple one http://issamsoft.com/app2/page1.aspx and I want
I want to have on my page something like This page last refreshed on:
I have a page with a couple of divs, sort of like this: <div

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.