Good day ppl.

I'm not sure if this is a "waste-time-question" but I'm going to give it a try here as 
I'm all new to ColdFusion.
May I consult the expertise out there of how to detect a browser type by using 
ColdFusion ?

I've got the user agent value by calling the environmental variable 
#cgi.HTTP_USER_AGENT# and initially I've
thought to do like this,

<CFSWITCH EXPRESSION=#cgi.HTTP_USER_AGENT#>
    <CFCASE VALUE="Netscape">
            ....
    </CFCASE>
    <CFCASE VALUE="MSIE">
            ....
    </CFCASE>
    <CFDEFAULTCASE>
        ....
    </CFDEFAULTCASE>
</CFSWITCH>

This wouldn't work as the user agent value that I've got is (I'm using Netscape under 
Linux) -> Mozilla/4.61 [en]
(X11; I; Linux 2.2.12-20 i686)  How do I split the line into some informations that I 
want ? And how should I
check against the browser types (is "Netscape" / "MSIE" the correct parameters to 
check against with ?)  ?

Thank you in advance for the helps.

Regards,
K.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to