Vinayak
Vinayak

Reputation: 436

How to call function on anchor tag click

I have one panel as xtype:'label'

I want to call a function when I click on the text in anchor tag.

can we do this in sencha touch.

Upvotes: 0

Views: 1482

Answers (1)

kevhender
kevhender

Reputation: 4405

Try something like this:

{
    xtype: 'label',
    html: '<a href="#" onclick="MyApp.app.getController(\'ControllerName\').myFunction(); return false;">My link</a>'
}

Upvotes: 3

Related Questions