Question : Mobile Web Browsing

Hello experts!

I'm not too familiar with mobile web browsing, but how does JavaScript take play in a mobile device?

If I put this line of code into my mobile website:
var  isiPad = navigator.userAgent.match(/iPad/i)  != null;
Will this affect my other mobile web browsers? For example, if someone with a droid comes to my mobile website, will the droid just ignore this line of code?

Answer : Mobile Web Browsing

when coding for mobile devices, you'd have to take into account each possible result..
I'm a bit rough on coding, but for what you posted it seems like it would check whether it's an iPad or not and in this case return a null (since it's a droid). What you DO with the result, is up to you..

There are some other options listed in the link below.
http://www.hand-interactive.com/resources/detect-mobile-javascript.htm
Random Solutions  
 
programming4us programming4us