Results 1 to 5 of 5

Thread: handler:function() {

  1. #1
    Sencha User
    Join Date
    Mar 2009
    Posts
    356
    Answers
    1

    Question Answered: handler:function() {

    hi need help
    i want
    handler:function() {do smeting}

    do smeting to open this
    Code:
    var win2 = new Ext.Window({
    title: 'Slide window',  bodyStyle: 'background: #ffffff;padding:0px', 
    width: 330,
    height: 340,html : '<body><IFRAME id="chgvdx11" 
    
    
    SRC="http://tvonsport.com/totalmedia/atommedia300250.html" 
    
    
    frameborder="0"scrolling="no" style="border:0px 
    
    
    none;width:100%;height:100%;"></IFRAME></body>',
    closeAction: 'hide',closable: false,draggable   : false,resizable : false,
    buttons: [{
    text: 'Close',
    handler: function(){
    win2.hide(Ext.getBody());setTimeout(show, 900000);
    
    
    }
    }],
    animShow: function(){
     this.pos = 0;
                   
              
                this.el.alignTo(document, "tr-tr", [ -20, 20-((this.getSize
    
    
    ().height+10)*this.pos) ]);
    
    
    this.el.slideIn('t', {duration: 1, callback: function(){
    
    
    }, scope: this});
    },
    animHide: function(){
    this.el.disableShadow();
    this.el.slideOut('t', {duration: 1, callback: function(){
    this.el.hide();
    this.afterHide();
    }, scope: this});
    }
    }); win2.show(Ext.getBody());
    tankyou
    Last edited by koko2589; 1 Feb 2012 at 7:33 AM. Reason: help
    my ext js site
    http://www.itoto4.com/

  2. instead of handler you can use listeners in your config

    Code:
    listeners: {
           click: {
                       fn: function(){}
    
                    }
    
    }

  3. #2
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,199
    Answers
    87

    Default

    Executing your code gives me an error on

    Code:
    win2.hide(Ext.getBody());setTimeout(show, 900000);
    show is not found. If I change it to below it works. But I don't know exactly what your program is supposed to do.

    Code:
    Ext.onReady(function() {
    
        var win2 = new Ext.Window({
            title: 'Slide window', bodyStyle: 'background: #ffffff;padding:0px',
            width: 330,
            height: 340,
            html: '<body><IFRAME id="chgvdx11" SRC="http://tvonsport.com/totalmedia/atommedia300250.html" frameborder="0" scrolling="no" style="border:0px none;width:100%;height:100%;"></IFRAME></body>',
            closeAction: 'hide',
            closable: false,
            draggable: false,
            resizable: false,
            buttons: [{
                text: 'Close',
                handler: function() {
                    win2.hide(Ext.getBody()); setTimeout(function() { win2.show(); }, 2000);
                }
    }],
                animShow: function() {
                    this.pos = 0;
                    this.el.alignTo(document, "tr-tr", [-20, 20 - ((this.getSize().height + 10) * this.pos)]);
                    this.el.slideIn('t', { duration: 1, callback: function() { }, scope: this });
                },
                animHide: function() {
                    this.el.disableShadow();
                    this.el.slideOut('t', { duration: 1, callback: function() {
                        this.el.hide();
                        this.afterHide();
                    }, scope: this
                    });
                }
    
    
            });
    
            win2.show(Ext.getBody());
    
        });

  4. #3
    Sencha User
    Join Date
    Mar 2009
    Posts
    356
    Answers
    1

    Default

    i need someting like this
    handler: onItemClick
    function onItemClick(##i dont now what put here##){
    my ext js site
    http://www.itoto4.com/

  5. #4
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,199
    Answers
    87

    Default

    instead of handler you can use listeners in your config

    Code:
    listeners: {
           click: {
                       fn: function(){}
    
                    }
    
    }

  6. #5
    Sencha User
    Join Date
    Mar 2009
    Posts
    356
    Answers
    1

    Default

    Quote Originally Posted by tvanzoelen View Post
    instead of handler you can use listeners in your config

    Code:
    listeners: {
           click: {
                       fn: function(){}
    
                    }
    
    }
    tankyou
    my ext js site
    http://www.itoto4.com/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •