There are some great custom tags that accomplish this sort of thing.  Check
the allaire tag gallery for them.  However if you want to do it yourself.
You will need to get the server variable.

cgi.http_user_agent

This contains the browser type information.  So taking your code add the
following line before it.
<CFSET browser = cgi.http_user_agent>

<cfif FindNoCase("Netscape",browser)>
        <cfinclude template="NSdoc.htm">
<cfelse>
        <cfinclude template="IEdoc.htm">
</cfif>

WARNING: there are numerous browser type names and it isn't going to be as
simple as looking for netscape or looing for ie.  You could have a whole
database full of types.

Mark Johnson
-----------------------
Senior Cold Fusion Developer
Cardinal Communications


-----Original Message-----
From: Guy J. McDowell [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 04, 2000 7:56 PM
To: CF-Talk
Subject: Browser Detect and CFIF


Hello CF_FOLK,

Is there a simple way to do a browser check and then depending on the
outcome have a specific outcome included via something like

<cfif Browser ISNOT "Netscape">
 <cfinclude template="IEdoc.htm">
<cfelse>
 <cfinclude template="NSdoc.htm">
</cfif>

Yours In Conservation,

Guy J. McDowell,
Webmaster
The Ontario Federation of Anglers & Hunters
E-mail: [EMAIL PROTECTED]
Phone: (705) 748-6324 ext. 262

P.S. You may want to check out all of our websites:
www.AuctionForWildlife.com - Your chance to make your bid for
conservation.
www.EcoEd.org - an online adventure for kids in grades 1 through 8.
www.HuntingDog.org - Celebrating our Hunting Dog Heritage.
www.AHTV.com - Your online companion to the Angler and Hunter
Television show.
www.OHEP.net -  Where to find out and learn about the Ontario Hunter
Education Program.
www.OFAH.org - the flagship site of the Ontario Federation of Anglers
& Hunters.

P.S.S. Don't blame me for any of these sites except HuntingDog.org.

----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to