Using JavaScript in a mobile web application

I need to use JavaScript in the form for a mobile web application.

I need information about this related to browser compatibility, as well as how JavaScript is used in mobile web applications (syntax).

+4
source share
8 answers

A nightmare. This is similar to working with web browsers in the 90s, but with the manager’s expectations tomorrow.

I highly recommend that you identify your target platforms in terms of regions, software, and actual hardware, as the market is much more fragmented than on the Internet, and a large number of mobile devices have problems with CSS, JS, and even XHTML, ranging from painful to non-on -this platform.

The good news is that android and iphone are quickly pushing the field. The bad news is that many sources will be badly outdated.

Some links:

Especially the last one :)

+6
source

Reality has changed since this question was asked. Modern smartphones support browsers compatible with their big brothers on the desktop with the same JavaScript support. However, there are still differences in how the application is displayed and how it works, you cannot rely on drag and drop, there are some differences in rendering, for example. in GWT-Ext Showcase on Opera Mobile tabs closed are not displayed. Thus, you should not rely on the modern "magic structure" of JavaScript, such as Ext.

+5
source

Agree with the comment "this is a nightmare."

Some tips:

  • For simple scripts, go back to the basics of JavaScript - no JS frameworks - think document.getElementById ();
  • Always make sure your JavaScript is valid. If you have an object, make sure you have commas and half-columns in the right place. An easy way to check this in Internet Explorer is to check in the bottom left for a valid or invalid JavaScript icon.
  • Make sure your Javascript is valid XML - Blackberry won't like it if it isn't.
  • For something more complicated, check out jquery mobile: http://jquerymobile.com/ - there is something nice there.
+2
source

I fully agree with annakata,

This is a minefield trying to work with JavaScript on a mobile phone, in fact we (I work for a mobile agency), as a rule, recommend to clients that you do not use JavaScript on your mobile pages.

If you need to use JavaScript, look at

And I would recommend creating only an iPhone site with all the cool features, and then a simple site for everyone else to work well for them.

Also remember that you can use the device anywhere to test on multiple phones.

+1
source

I would recommend you use the new Sencha mobile web application infrastructure http://www.sencha.com/

This platform supports a wide range of mobile platforms, such as Adroid, iPhone and others ...

Good luck, Eugene V. Softjourn Inc. Software developer.

+1
source

Another good solution for working with multiple devices (IPhone, Android, BlackBerry, Bada ...) and the use of innovative components is the use of JavaScript Toolkit Wink .

+1
source

Khushi,

I just founded a framework called PhoneGap, you create your application using javascript, html5 and css. You can even play with your own device features.

Take a look at more information at http://www.phonegap.com/about .

+1
source

You can find out Patrick H. Lauck, who wrotes quirksmode blog . He began working with mobile phones in the recent past.

He publishes his work on the same website in the same remarkable quality.

Browsers in new mobile phones are getting better, it's true, but, unfortunately, even the craziest mistakes appear.

Not everyone is javascript related, but you can check its mobile pages at:

http://www.quirksmode.org/mobile/

0
source

All Articles