-
17 Jul 2012 11:30 AM #1
Overriding the behavior of html to show a component instead of a link
Overriding the behavior of html to show a component instead of a link
i have a panel with a label item inside.
it has an hml :'<a href=\"Cool link\"/>' which points to a link.
How can I show a component (messagebox or other) when the link is pressed?
-
17 Jul 2012 12:40 PM #2
You could use the following:
Scott.Code:Ext.onReady(function() { myPanel = Ext.create('Ext.Panel', { width: 300, height: 100, title: 'Title', layout: 'vbox', frame: true, renderTo: Ext.getBody(), items: [ { xtype: 'box', autoEl: {tag: 'a', href: 'javascript:;', html: 'Click Me'}, listeners: { click: { element: 'el', fn: function(){ var myWin = Ext.create("Ext.window.Window", { title: 'HTML Window', modal: true, width: 200, height: 200 }); myWin.show(); } } } } ] }); });


Reply With Quote