Chapter 7. Enhancing the Client with JavaScript

In this chapter, we will cover the following recipes:

  • Using action functions
  • Avoiding race conditions
  • The confirmation dialog
  • Pressing Enter to submit
  • The onload handler
  • Collapsible list elements
  • Trapping navigation away
  • Creating a record using JavaScript remoting

Introduction

JavaScript is used on a huge number of websites to add visual effects, validation, server interaction, and many more features. As JavaScript executes on the client side, it removes the latency involved with a round trip to the web server, resulting in more responsive applications and an improved user experience. JavaScript can also provide functionality that is not possible using HTML and server-side processing, for example, handling ...

Get Visualforce Development Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.