1. #1
    Ext User
    Join Date
    Mar 2009
    Posts
    26
    Vote Rating
    0
    pearl_123 is on a distinguished road

      0  

    Default How to make link and call a function

    How to make link and call a function


    hi to all,

    I am using ext js library to develop ajax base site i have following code to show the top menu onclicking i call different function and performe different action.

    Code:
                 new Ext.Button({
                    text: '     Einstellungen      ',
                    handler: function(){
                        Ext.MessageBox.show({
                            title: 'Laden...',
                            msg: 'Bitte warten...',
                            width:300,
                            wait:true,
                            waitConfig: {interval:100}
                        });
                     configuration();
                    }
                }).render('changePw1');
    
                new Ext.Button({
                    text: '     Kunden       ',
                    handler: function(){
                        Ext.MessageBox.show({
                            title: 'Laden...',
                            msg: 'Bitte warten...',
                            width:300,
                            wait:true,
                            waitConfig: {interval:800}
                        });
    
                        kunden();
                    }
                }).render('changePw2');
    
                new Ext.Button({
                    text: '     Lieferfreie Tage      ',
                    handler: function(){
                        Ext.MessageBox.show({
                            title: 'Laden...',
                            msg: 'Bitte warten...',
                            width:300,
                            wait:true,
                            waitConfig: {interval:800}
                        });
                        deliveryDays();
                    }
                }).render('changePw3');
    
                new Ext.Button({
                    text: '     Liefertage-Vorlagen      ',
                    handler: function(){
                        Ext.MessageBox.show({
                            title: 'Laden...',
                            msg: 'Bitte warten...',
                            width:300,
                            wait:true,
                            waitConfig: {interval:800}
                        });
                        deliveryDayTemplates("");
                    }
                }).render('changePw4');
    
                
    
                loggedIn('ln');

    Now i want to make link some think like <a href="">Click here</a> not button like shown above and onclicking link call function

    how i can do this

    thanks in advance.

  2. #2
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,361
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    Ext.fly('yourLinkId').on('click, function() { do something});

Thread Participants: 1