PDA

View Full Version : Displaying text as hyperlink



Supriya Kale
26 Dec 2012, 11:26 PM
Hi,

I am using extjs- 4.1.0. I need to display a text as a hyperlink.
I tried using autoEl and tpl. But it doesn't seem to work.
Please find my code below:


{
text: 'Full Name',
xtype: 'label',
tpl: '<a href="" >{this.text}</a>',
width: 60
}


{
text: 'Full Name',
xtype: 'label',
autoEl:'a',
width: 60
}

Thanks in advance

existdissolve
27 Dec 2012, 3:40 AM
autoEl should work just fine. Try this:



autoEl: {
tag: 'a',
href: 'http://google.com',
target:'_blank'
}


Here's an example: http://jsfiddle.net/existdissolve/vgcue/