[thelist] Script for M$IE only, or not

Richard Bennett richard.bennett at skynet.be
Sat Apr 1 16:22:55 CST 2006

On Saturday 01 April 2006 23:47, Felix Miata wrote:
>  I just want to
> throw an alert based upon whether the browser is really IE or any other
> browser. It seems object detection is the way to go, but I'm not finding
> a suitable object to detect.

I don't have the answer to that question, so this reply might not be very 
helpfull, but...
The reason people suggest object detection is the way to go is because it is 
more efficient to detect if a browser supports the object you want to use in 
your code, than to detect which browser they are using.
In the nineties people used browser detection:
	//Use workaround for other browsers.

But then many browsers started supporting similar features, so it became more 
efficient to use object detection:
if(obj && obj.innerHTML){
	//Use DOM scripting, etc.

So the idea is not to use object detection to find out which browser the user 
has, but to find out if their browser supports the object you want to use.
If you really want to do it like you asked, you can probably use the 
window.createPopup, as that is IE-only. Ie5.5 and after though.


More information about the thelist mailing list