In any given app, you'll notice that creating buttons and capturing their click events is one of the most common tasks you do. This recipe will show you how to declare a button control in Titanium and attach a click event to it. Within that click event, we'll perform a task and log it to the info window in Appcelerator Studio.
This recipe will also demonstrate how to implement some of the default styling mechanisms available for you via the API.
app.js file and type the following code. If you're following along with the LoanCalc app, the following code should go after you created and added the textfield controls:
//calculate the interest for this loan button var buttonCalculateInterest ...