-
13 Jul 2012 6:37 AM #1
Unanswered: Hyperlink via Sencha Ext JS 4.1
Unanswered: Hyperlink via Sencha Ext JS 4.1
Hi, everyone, I'd like to know how to create an hyperlink via Ext JS. Can somebody Help ?
-------------------------------------------------
Sorry, I managed to find it
{
xtype: 'component',
autoEl: {
tag: 'a',
href: '/* la destination - target */',
html: '/* le texte du lien - text to display */'
}
}Last edited by elardev; 13 Jul 2012 at 7:04 AM. Reason: Solved
-
13 Jul 2012 7:02 AM #2Sencha - Community Support Team
- Join Date
- May 2012
- Location
- Istanbul
- Posts
- 1,331
- Vote Rating
- 76
- Answers
- 124
Hi,
I have created a panel & inside that I create a anchor by overriding the el of component. Review the following code:
Code:Ext.create('Ext.Panel', { title: 'myPanel', items: [ { xtype: 'component', autoEl: { tag: 'a', href: 'http://www.google.com', html: 'Click to open google' } } ], renderTo: Ext.getBody(), height: 100, width: 200 });sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.
-
13 Jul 2012 7:07 AM #3
Thank you for answering
I'm a little lazy sometimes, but I managed to find it out thanks
-
27 Sep 2012 6:06 AM #4
hi sword-it,
That's a good solution to get the hyperlink.
Your solutions are always proved helpful to me.
Can you please tell me how to call any javascript function when i click to the hyperlink which you have given.
Can i write a javascript function in 'href'.
I tried 'href: 'javascript:alert('hi')''
But its not working.
Can you suggest any solution.


Reply With Quote