Bdfy
Bdfy

Reputation: 24621

how to make href from Ext.form.Label?

I have a label:

url= new Ext.form.Label()
url.setText("test");

but url is escaped.

Upvotes: 0

Views: 2414

Answers (1)

Alin Suciu
Alin Suciu

Reputation: 121

You cannot create an URL from the text of the label :

{
   xtype:'label',
   text:'<a href="www.google.com">Google</a>'
}

This kind of code won't generate a hyperlink. Instead use a displayfield:

{
   xtype:'displayfield',
   value:'<a href="www.google.com">Google</a>'
}

Upvotes: 1

Related Questions