1 Reply Latest reply on May 18, 2010 11:44 AM by Chorale0001

    newbie question : browser detection

    Chorale0001 Level 1

      Hello.

      After much research on google and a couple of try, i found a script that should work... except it isn't.. it is still sending me to the french webpage while i have an english browser...

       

      any clue ?

       

      function(){return A.apply(null,[this].concat($A(arguments)))}

      <script type="text/javascript">
        var l_lang;

        if (navigator.userLanguage) // Explorer
      {    l_lang = navigator.userLanguage;
      window.location="http://detectmobilebrowser.com/www.episodesoft.com/demo/index_fr.html|www.episodesoft.com/ demo/BlackBerry/index.html"
      }
      else if (navigator.language) // FF
      { l_lang = navigator.language;
      window.location="http://detectmobilebrowser.com/www.episodesoft.com/demo/index_fr.html|www.episodesoft.com/ demo/BlackBerry/index.html"
      }
        else
      { l_lang = "en";
      window.location="http://detectmobilebrowser.com/www.episodesoft.com/demo/index_us.html|www.episodesoft.com/ demo/BlackBerry/index.html"
      }
      </script>


      thanks