Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Carlos 338 posts 472 karma points
    Feb 03, 2011 @ 19:45
    Carlos
    0

    Useragent redirect, alt templates and mobile to back to normal templates

    So I successfully have a basic Javascript set up to see if we have a specific user agent to switch to our alternate templates for our mobile templates.  

    Javascript is as follows

    if((navigator.userAgent.match(/android/i)))
    {
      document.location.href='/mobile-home.aspx';
    }

    Works fine BUT, I need to override the Useragent request to take them back to the normal templates if they choose the link "Back to Full Site"

    How would I go about this? How would I switch back to the normal templates?  If you can give an example that would be great! Thanks.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Feb 03, 2011 @ 21:32
    Jan Skovgaard
    0

    Hi Carlos

    would'nt this be a matter of setting a variable and check if it is true and then skip the navigator stuff if it is?

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft