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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:26:38+00:00 2026-05-18T04:26:38+00:00

The if condition below I think it says – if the browser is IE

  • 0

The if condition below I think it says – if the browser is IE and IE browser version is newer than 9, but I don’t have IE 9 to test it so it is hard to know the correct output, also this is not 100% of what I want bcos this script should be ran on other browsers too by default like Chrome, Firefox, etc – is it possible to set it in the if condition?

if ($.browser.msie && parseInt($.browser.version) > 9) 
{
  // run this code
}

The reason why I want to use if condition is that the script appears to have error on IE 7 and of course the best thing is to fix the script but I cannot tell which part of the script that IE doesn’t accept it (all other browsers work perfectly fine!). Do u know any tool I can use to debug the script for IE 6, 7, 8, etc? I am using notepad++ to write my jquery, etc, so it doesn’t provide any debug stuff…

So, my next best solution is not to run this script if it is IE browser which is older than 9.

By the way, this is the error message display on the IE7 browser but I can never understand it!

Line:910  //which line?
Char:4   // what the hell is this?
Error: Object doesn't support this property or method //what?
Code: 0    // 0 of what?
URL: http://localhost/mysite/page-1 // so which file is causing the error then? the .js or .html or something else??

bloody IE!

thanks.

  • 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-18T04:26:39+00:00Added an answer on May 18, 2026 at 4:26 am

    Firstly, you can get IE9 preview by downloading it from Microsoft’s site: http://ie.microsoft.com/testdrive/

    Secondly, parseInt($.browser.version) > 9 would presumably check that the version is greater than 9, which of course it won’t be until v10 is released. (you maybe intended >= (‘greater than or equal to’)?

    I usually tell people to avoid browser detection or browser-specific code. There are times when it is necessary, but they’re quite rare. Most of the time the developer would be better served by knowing what was failing and working around it (tools like Modernizr really help for this sort of thing).

    However there are times when one simply has to do browser detection.

    In your case, if you really need to detect IE, don’t do it the way you’re doing (ie checking for version 9); it’d be better to check for older versions, and I’d suggest that a conditional comment would be the best way to do it.

    <script>
    var i_am_old_ie = false;
    <!--[if LT IE  9]>
    i_am_old_ie = true;
    <![endif]-->
    </script>
    

    Then your if() statement later on can just look like this:

    if(i_am_old_ie) {
       //do stuff for IE6/7/8
    } else {
       //do stuff for all other browsers (including IE9)
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What would be the search condition for the query below if we wanted to
I have a condition in which I need to close the application and so
I have this If condition in VB6 If ( X AND ( 2 ^
I have exceptions created for every condition that my application does not expect. UserNameNotValidException
I think the question itself is pretty self-explanatory. The code is given below -
I designed 5 stored procedures which almost use same join condition but parameters or
Is there any condition where finally might not run in java? Thanks.
I've seen there are some race condition analysis tools for C++, C and Java.
If I query a table with a condition on the key field as in:
Would it be possible to print Hello twice using single condition ? if condition

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.