473,387 Members | 1,890 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Programatically detect IE6 or IE7 ?

Hello,

Is there a way in Javascript to tell if a user has IE7 vs. IE6 ?

Thanks for any help....
Jan 21 '07 #1
5 28636
AricC
1,892 Expert 1GB
This page should help you out.
Jan 21 '07 #2
Thanks.... I tried the code suggested, but it tells me that I have version 4 of MSIE when I actually have version 7.

Any ideas ?
Jan 21 '07 #3
acoder
16,027 Expert Mod 8TB
On that page, it has the following:
IMPORTANT! The version number is WRONG in IE 5.0 or later! Microsoft starts the appVersion string with the number 4.0. in IE 5.0 and IE 6.0!!! Why did they do that??? However, JavaScript is the same in IE6, IE5 and IE4, so for most scripts it is ok.
Jan 21 '07 #4
acoder
16,027 Expert Mod 8TB
Instead of using appVersion, use navigator.userAgent instead then use a regular expression to parse it to find the version number as explained from the horse's mouth.
Jan 21 '07 #5
acoder
16,027 Expert Mod 8TB
You can also use conditional compilation. The j_script_version for IE7 is 5.7

Yet another option is conditional comments:
<!–[if IE 7]>
// ie7 code
<![endif]–>
See here .
Jan 21 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: CoreyMas | last post by:
Hello Everyone, I have been successful in creating a template column programatically using the examples provided in VS 2003. However I have not been able to programatically set the width of a...
3
by: Richard H. Rowson | last post by:
Does anyone know of a way to detect which drive is a Zip drive (I guess in the same way that the various system variables can be queried) ?>Thanks
1
by: Susan | last post by:
I have a bound form and subform and am trying to enter the data in both forms programatically. The Linkmaster and Linkchild properties are set. My intent is to be able to look at the data before it...
2
by: Edgardo Rossetto | last post by:
Is it possible? Or I must add the control programatically in order to make changes programatically? Edgardo
8
by: Rak | last post by:
I am looking for a way to programatically change the .net version of the virtual directory that I am creating within a aspx page. As part of creating a new customer in my asp.net 2 application, it...
2
by: Woo Mun Foong | last post by:
Hi, I need to write a monitoring program to check a series of application residing in a server. The monitoring program should be able to :- 1) Determine whether the applications it is looking...
0
by: OceanBreeze | last post by:
I have added a LinkButton to the web page programatically from server side code using ASP 2.0 and C# in my Page_Load method. I also associate this LinkButton with a LinkButton_ClickHandler_Edit and...
4
by: jim | last post by:
I need to know if a laptop is connected to the Bellsouth network or the Sprint wireless network. How can this be done with VB.Net 2005?
7
by: The Mad Ape | last post by:
Hi I have code to programatically create a label. It works but when I try to call a sub to create a tooltip it does not work. I do not get an error so have no idea what it wrong. Please review...
3
by: =?Utf-8?B?UGF1bA==?= | last post by:
I need to programatically upload a text file to a web server using the HTTPWebRequest object within .Net 2.0. So far, I have determined that: - I need a HTTP content-type of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.