Sonn Sonn -3 years ago 87
Javascript Question

ExtJS/Javascript: How the function for clicking event actually works?

sorry if my question sounds stupid but I would like to ask that how the function for clicking event actually works? I mean how the parameters are passed to the called function. For example in this ExtJS Example, in the View when we click the delete button, it will call the

function which be defined in the Controller:

onDelete: function (t, rowid, colid, item, evt, rec) {
var store =;


What i dont really understand here is how these parameters (t, rowid, colid, evt, rec) are passed to the function definition while in the view we called only the name of the function
, nothing else. So where these parameters come from?

Any answer is appreciated and please dont vote my question down insted ignore it if you think it is a stupid one but i just ask what i really dont understand. Thank you

Answer Source

These parameter are passed by the ExtJS library. This allows you to concentrate on the feature you want to achieve (delete a record) instead of writing code to find the clicked row record before doing the real work.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download