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

Deleting records

Sometimes we'll need to delete some records of our table. This is a common operation in applications using databases. For this recipe, we're going to modify the application developed in the previous recipe by adding a link for each field. This new link will be useful to invoke a new JavaScript function to do the job.

If the selected record is deleted, we'll display an alert box with a message reporting about the success of the operation. Otherwise, another alert box will launch an error message.

Getting ready

For our example application we'll need UiUIKit and XUI frameworks. Once again we're going to reuse the code specified in the previous recipes about dealing with local databases.

How to do it...

  1. The first step will be to save ...

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