Reputation: 115
How can a label be formatted to have look of a link in extjs? I don't want to have link functionality (to go to specific href). I would like just to have classical button which looks like a link and have click listeners.
I've tried with the following code:
{
xtype: 'box',
autoEl: {tag: 'a', href: 'http://www.google.com', html: 'Google'}
}
but, this is classical link.
I also tried
{
xtype: 'box',
html: '<a href="" class="link-forgot-password"> Forgot Password ?/a>'
}
That looks fine, but what is missing is listener.
Upvotes: 0
Views: 152
Reputation: 4706
Something like this:
{
xtype: 'box',
html: '<a href="#" class="link-forgot-password"> Forgot Password ?/a>',
listeners: {
el: {
click: function () {
console.log('click');
},
scope: this
}
}
}
Upvotes: 3