11 Replies Latest reply: Apr 16, 2014 10:54 AM by ACS LLC RSS

    Coldfusion – detecting Flash vs HTML5

    Jellyhead Community Member

      Hi all – I have a dumb question – I’m not the worlds best scripter…


      I’ve got a ColdFusion page, with an element in it that is either flash, or HTML5.


      I need a way to detect what is happening client-side and push the client to either the Flash element, or the HTML element (or a s “you’re WAY behind the times” element if neither).


      I’ve found, and used, modernizr, but it does things the wrong way round for me.  I need to direct my clients to flash 1st, then HTML5, then the sorry page.  Modernizr only gives me HTML 5 first then Flash, and this isn’t working for me.  the flash element is the preferred element.   I’ve screwed around with trying to “swap out” modernizr, but my glasses aren’t thick enough. 


      Thus, I (roughly) need something that does this:


      <cfif “flash”>

      Direct them to flash page

      <cfelseif “html5”>

      Direct them to HTML 5 page


      So, how is life in the 18th century?



      Help, please..  It does not have to be CFM, it can be a JavaScript or anything.