1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    2
    Vote Rating
    0
    saTester123 is on a distinguished road

      0  

    Default 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?

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,868
    Vote Rating
    438
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    You could use the following:

    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();
                            }    
                        }   
                    }   
                }
    
            ]
        });
    });
    Scott.​

Thread Participants: 1

Tags for this Thread