1.

Solve : auto-detect if user is on a laptop or a cell phone?

Answer»

My problem is that I have a website that we are TRYING to get so that you can access it on your phone or on a laptop. I have no idea if this is even possible to be able to tell what type of device is accessing the page. ANYONE have an idea?check the browser. phones and pdas use DIFFERENT browsers than pcs do. It's fairly simple using javascript. Basic, non-working code:
if (browser=ie||firefox||opera||safari) open pc page
else open non-pc page

Not sure how or even why you would need to check if its a laptop. Could you give me a hint for the why?
You may be able to use vbscript, but I'm not sure if phones would SUPPORT that at all, in fact some computers wouldn't either.
Easiest solution: Ask the user.
Detecting laptops would be close to if not completely impossible since they use the exact same software desktop computers do and I honestly can't see any reason for detecting laptops either. But YES phones and pdas should be possible by checking the browser.



Discussion

No Comment Found