css, this code changes the colors of the service link??™s parent div for 500 milliseconds, and
then sets them back to normal. The visual effect simulates, as much as possible, the default behavior
of iPhone. Finally, a return statement is added at the end of the block to ensure that the
preventDefault() command is not called (which would prevent the services link from
working correctly).
Chapter 7: Integrating with iPhone Services
164
The telephone links of the Contact panel, shown in Figure 7-7 , are now styled and fully functional.
Figure 7-7: Telephone links added to the Contact panel
Sending Emails
Emails can also be sent from your application through links using the familiar mailto: protocol, as
shown in the following example:
Jack ArmitageWhen this link is clicked by the user, Mail opens and a new message window is displayed, as shown in
Figure 7-8 . The user can then fill out the subject and body of the message and send it. As you would
expect, you cannot automatically send an email message using the mailto: protocol without user
intervention. The mailto: protocol always takes the user to a new message window.
Chapter 7: Integrating with iPhone Services
165
Following the mailto: protocol, you can also include parameters to specify the subject, cc address, bcc
address, and message body.
Pages:
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196