0

Possible Duplicate:
Simplest way to detect a mobile device

I'm not sure if it's as simple as it sounds, but I'd like to get the following:

Currently I have a form that takes an input of a start address, and then directs the user to Google Maps using driving directions to a defined end address (it works fine).

What I'd like to do is insert a really simple lightweight 'if' statement basically saying 'If the device is a mobile device, show a text link to another page. If it's anything else, show the form'.

Is this as simple as it sounds?

Community
  • 1
  • 1
Lee
  • 1

1 Answers1

0

There is really no one "simple" way to detect a mobile or desktop browser. There are some simple ways that will work for most but not all cases, and there are some classes and scripts that simplify it for you but are very (necessarily) complex on the back-end. This website gives you a pretty simplified version in a variety of different programming languages - http://detectmobilebrowsers.com/.

Kyle
  • 1,757
  • 1
  • 12
  • 22