Ask a Question related to Macromedia ColdFusion, Design and Development.
-
Outside5.com #1
<CFLOCATION> depending on browser type/version
Hey hey hey,
I am in the process of finishing a new style sheet based site and need a way
to have coldfusion pass my page the browser type and browser version to
redirect users of non standard compliant / older browsers to another page.
I have tried:
<cfset browser = #cgi.http_user_agent#>
<cfif findNoCase ("msie 6", #browser#) EQ 0 or findNoCase ("netscape/7",
#browser#) EQ 0 or findNoCase ("Firefox", #browser#) EQ 0>
<cfset redirect = "no">
<cfelse>
<cfset redirect = "yes">
</cfif>
But this does not work as I was expecting it to.
Any ideas gang? Is there a better way to do this?
Many thanks,
Paul
Outside5.com Guest
-
Please help --> How can I install flash player plugin (version 8) in browser without downloading setup or redirecting to macromedia site if flash plugin is not available in browser
Hi, Please help How can I install flash player plugin (version 8) in browser without downloading setup or redirecting to macromedia site if... -
Please help : Know the browser type into ActionScript ?
Hi there ! I'm working on a script that must call many JavaScript functions at the same time. To do that, I'd like to use "fscommand()" to... -
PDF file doesn't open in web browser for Version 5 but does open for version 6
This problem was solved by uninstalling Acrobat and reinstalling it. Then I downloaded the latest patch and installed that. -
Content Type = EXCEL in browser
I'm trying to change content type of an ASPX page in the browser and send some data so the browser mimics an EXCEL spreadsheet (changed the content... -
Browser, Version and OS from HTTP User Agents?
Very minor difference in browser versions are having a significant effect on whether Mac users can access some of our web pages. Does anyone know... -
dempster #2
Re: <CFLOCATION> depending on browser type/version
It looks like you have problems in your if statement. FindNoCase will return a
TRUE value if the substring is found in the string. Your want to set redirect
to no if any of these three conditions is true. Try this syntax:
<CFIF FindNoCase("msie 6", browser) OR
FindNoCase("netscape/7", browser) OR FindNoCase("Firefox", browser)>
do not redirect
<CFELSE>
redirect
</CFIF>
-Paul
dempster Guest
-
Outside5.com #3
Re: <CFLOCATION> depending on browser type/version
<CFIF FindNoCase("msie 6", browser) OR
FindNoCase("netscape/7", browser) OR FindNoCase("Firefox", browser)>
do not redirect
<CFELSE>
redirect
</CFIF>Many thanks dempster - like a charm
Outside5.com Guest



Reply With Quote

