Bookshelf Home | Contents | Index | PDF |
Oracle CRM On Demand JavaScript API Developer's Guide > JavaScript API Reference > Methods for the Button Object > Defining an Event Handler for a ButtonTo define an event handler for a button, you must define a JavaScript function in the following format: function YourFunName(evt,data){ The evt parameter is the regular event object from the browser. The data parameter is the additional data that you want to pass to the event handler. Both of these parameters are optional. Inside the function body, the You can attach the event handler to your button using this code: btn.on("click",YourFunName,"Your String"); In this example, |
Oracle CRM On Demand JavaScript API Developer's Guide, Release 36 | Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |