iPhone JavaScript

Building the information fields (Building Interfaces) (iPhone JavaScript)

In previous recipes, we learned how to create simple lists for items and for navigation. This recipe explores the way to build a new widget for displaying a similar list. It contains labels and its associated values and will be very useful for showing information similar to a read-only form typically used in web applications. […]

Building forms with checkboxes, radio buttons, select fields, and text fields (Building Interfaces) (iPhone JavaScript)

One of the most common widgets for building graphical interfaces is the form. It is used as an interactive component to get information typed by the user. Modern web and desktop applications make intensive use of this widget. The iPhone applications are not an exception. Forms are composed of different widgets as text fields, checkboxes, […]

Creating and customizing a notification box (Building Interfaces) (iPhone JavaScript)

Without doubt, applications need to send notifications to their users. The iPhone applications are not an exception, and the Safari Mobile browser implements a native JavaScript function to do that. Actually, this function is the same as the one used by other web browsers. Surely, you all know this function; it is the famous alert. […]

Building a chat-style interface (Building Interfaces) (iPhone JavaScript)

The iPhone introduces a special interface for displaying SMS and chat messages. It displays bubbles similar to comic balloons with the text of each user who participates in the conversation. These bubbles appear on the right or on the left depending on the user who types the text. This interface may not be very common, […]

Creating a date picker (Building Interfaces) (iPhone JavaScript)

A datepicker is a widget designed to select a specific date choosing a month, a day, and a year from a predefined set of options. Using this widget, the developer can be sure to offer to the user a way for selecting a real date without errors. Another advantage of this widget is that it […]

Using different tabs (Building Interfaces) (iPhone JavaScript)

Despite the fact that tabs are more popular for web and desktop applications, we can build a graphic interface with it for our iPhone applications. Usually, tabs are used as a container within a window or a page. It is a navigation widget for switching between a set of widgets used for grouping common functionalities. […]

Identifying the devices (Events and Actions) (iPhone JavaScript)

Introduction This topic covers topics related to events and actions. Both are an important issue of the user interface because they allow a better control of the interaction between the user and the device. The first few recipes of this topic show you how to detect and respond to the main events launched by the […]

Viewing applications in full screen (Events and Actions) (iPhone JavaScript)

Obviously, web applications were designed to be viewed with a web browser. Keep in mind that we’re developing non-native applications to look and feel like native applications, by using our knowledge of web technologies, such as HTML, CSS, and JavaScript. But we need a web browser for displaying these applications. In fact, we’re using the […]

Detecting full screen or browser mode (Events and Actions) (iPhone JavaScript)

As you’ve learned in the previous recipe, an application can run in full screen or in browser mode. By default, web applications will run on the second one, that is, in the browser mode. Because it’s possible to run applications in these two modes, it could be useful to detect which mode is running. Let’s […]

Scaling to device width (Events and Actions) (iPhone JavaScript)

The previous topic covered the fundamentals of the graphical user interface for the iPhone. Refreshing your mind, we described the viewport as the rectangular area determining how the content of the application displays on the device. This one is an important concept to keep in mind when you’re building web applications that have a native […]