O'Reilly logo

Development with the Force.com Platform: Building Business Applications in the Cloud, Third Edition by Jason Ouellette

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

Action as JavaScript Event

To invoke an action on the controller as a result of a JavaScript event, use the actionSupport component. This component fires an action whenever the event is detected on the enclosing Visualforce component.

The actionSupport component is placed within the body of a Visualforce component that fires the JavaScript event of interest. For example, an inputField component renders an HTML input element, so it fires standard JavaScript events such as onfocus, onblur, onclick, and so forth. Placing an actionSupport component within the inputField component allows it to listen for one of these events and invoke a controller method in response.

To use actionSupport, specify the name of the controller method to invoke in its ...

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