Ontap with parameters

Help plz. I cant understand how I can make such things in Enyo.
onclick="Operation('+')"

function Operation (Op) {
//do something
}

I wanna make such with ontap but I dont know hot to send parameters.

waiting for answer.
Thnx

Comments

  • all enyo events have the same method signature:
    function handlerName(inSender, inEvent) {}
    inSender is (generally) the enyo instance that is source of the event (e.g. the control that was tapped) and inEvent has the event payload (e.g. the key pressed or mouse button clicked).

    In your example, specifying onclick="Operation" will attempt to trigger a function named "Operation" on the enyo instance that owns the sender. Enyo will pass the sender and the event payload to Operation. If you want to pass additional data, you can either generate custom events or include custom properties on the sender.

    http://jsfiddle.net/ryanjduffy/85sNN/
Sign In or Register to comment.