O'Reilly logo

iPhone JavaScript Cookbook by Arturo Fernandez Montoro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating and customizing a notification box

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. However, if you call directly to this function in your code, the browser will launch a notification box with a title at the top. By default, this title displays the URL of the page, as shown in the following screenshot:

Creating and customizing a notification box

Many developers find this title unprofessional so it's ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required