Detect browser


So I am working on a site that doesn’t work really well in IE but basically what I want to do is that to get the site to detect the browser that is running and if it detects IE then display a message saying the site doesn’t work with IE.

I am wanting to use Jquery Colorbox:

But can anyone help me out with firing off the message to display?

I got the javascript code to detect the browser here:

<script type=“text/javascript”>
function detectBrowser()
var browser=navigator.appName;
var b_version=navigator.appVersion;
var version=parseFloat(b_version);
if ((browser==“Netscape”||browser==“Microsoft Internet Explorer”)
&& (version>=4))
alert(“Your browser is good enough!”);
alert(“It’s time to upgrade your browser!”);

Rather than insult your users, if you’re not willing to make the site work in the most used browser, just let it look bad and put a “optimized for [whatever browser you use]” message at the bottom, discretely. Or do you really want to shut them out of the site, since this is basically a “go away” sign?

i tried making it work but i given up. i guess as i see it “its time to upgrade”.

Browser identification is not fool proof as some browsers can be set to identify themselves as another. For example Opera.

There’s no such thing as a browser that doesn’t identify itself as another

Required Reading

my issue isn’t about people who go and attempt to fool the reporting of what browser it is. that is their problem.

like i said the IE is buggy in IE for whatever reason and I cannot seem to fix it. A lot of the thing that work in all other browsers don’t work in IE.

IE doesn’t support cufon nor it won’t show all links but some do and no different between the two but it is weird.

Changing software isn’t upgrading. You don’t “upgrade” from Coke to Pepsi. Nor will your site visitors care about your personal opinion of their browser, unless this is a site for opinionated web developers.

well i don’t know like i said i given up. i cannot find the reason as to why somethings just wont work. the top banner has some working normal links but others don’t work the design is messed up only for some. the same others appear just fine!

i have no reason why this is going on:

Is the browser your viewing it with operating in standards mode or quirks mode? Does the HTML validate?

Is the browser your viewing it with operating in standards mode or quirks mode? Does the HTML validate?