The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Detecting browser help.
Hefty
post Dec 1 2007, 07:18 PM
Post #1


Member
***

Group: Members
Posts: 48
Joined: 30-November 07
Member No.: 4,440



I've been looking around for the exact code but cannot find it. What I want is a code that detects if the user is using Internet Explorer and if so then display an error message saying 'We detect you are using Internet explorer, part of the site may not be fully functional with your browser".

Please help.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Dec 1 2007, 07:49 PM
Post #2


.
********

Group: WDG Moderators
Posts: 9,656
Joined: 10-August 06
Member No.: 7



You could use conditional comments: http://www.quirksmode.org/css/condcom.html or its javascript equivalent: http://www.javascriptkit.com/javatutors/co...alcompile.shtml

But if possible it's better to make a page or script degrade gracefully without bothering the user with warnings: http://www.quirksmode.org/js/support.html

You should also make sure the page works without any javascript.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Dec 1 2007, 08:18 PM
Post #3


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Does this mean your site will be fully functional if I use, say, Netscape 4?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Dec 2 2007, 01:22 AM
Post #4


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



Or Opera or Firefox with all the bells and whistles disabled?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Dec 2 2007, 05:40 AM
Post #5


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Or only some of them disabled? happy.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
raphael75
post Dec 3 2007, 02:00 PM
Post #6


Novice
**

Group: Members
Posts: 28
Joined: 12-November 07
Member No.: 4,295



if(navigator.appName=='Microsoft Internet Explorer')
{
alert('Get Firefox')
}

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CodeKing
post Dec 18 2007, 06:46 PM
Post #7


Advanced Member
****

Group: Members
Posts: 175
Joined: 12-September 06
Member No.: 118



I would use browser detection to run a script that will fix the bugs in IE, not an error message saying the site won't work entirely. Since most people use IE, they aren't going to be happy the bells and whistles are disabled.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 24th April 2024 - 09:50 AM