Jump to content

Redirection for Mobile Devices?

Recommended Posts

Hi - I'm attempting to create a dashboard and currently fiddling with layouts.  I likely will have a layout that contains 3 sections (left, top right and bottom right) each with it's own datapage.  I envision a details page on the left and tabular reports in the top right and bottom right.  I believe I can get that to work the way I want, however my experimentation thus far suggests that a complicated screen layout like this will not be conducive to moblile phones.  So  I need a solution for mobile phones and was wondering if perhaps the best solution is to have totally separate pages for mobile devices.  If I go that route, then I'd need a way to redirec the user to a different page based on the device.  Is this the best solution and if so, any ideas on the code to implement?  Thanks.

Link to comment
Share on other sites

Hi @Tuccisal,

I had the same setup before, but I scratched it off since most of our users are using a desktop to access our app.

Here is a sample of the JavaScript code I used to redirect my mobile and desktop users to their respective DataPages:

<script type="text/javascript" language="javascript">
  if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
    //redirect user if using mobile
  } else {
    //redirect user if not using mobile

I hope this helps!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...