<CFLOCATION> depending on browser type/version

Ask a Question related to Macromedia ColdFusion, Design and Development.

  1. #1

    Default <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

  2. Similar Questions and Discussions

    1. 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...
    2. 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...
    3. 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.
    4. 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...
    5. 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...
  3. #2

    Default 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

  4. #3

    Default 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139