1. #1
    Sencha User
    Join Date
    Feb 2011
    Posts
    111
    Answers
    5
    Vote Rating
    0
    sissonb is on a distinguished road

      0  

    Default Unanswered: Update Ext.form.Text inputCls

    Unanswered: Update Ext.form.Text inputCls


    I have a text form and want to update the inputCls property on keyup. This is how I am currently trying, but it's wrong.

    Code:
    new Ext.form.Text({            
                name : 'referredFrom',
                id : 'referredFrom',
                inputCls:"invalid",
                label: 'Account Number',
                listeners:{
                    keyup:function(){
                        
                        var isValid = true;
                        if(isValid){
                            Ext.getCmp("referredFrom").inputCls = "valid";                        
                        }
                        else{                        
                            Ext.getCmp("referredFrom").inputCls = "invalid";
                        }
                    }
                }
            });
    Any Ideas?
    Thanks

  2. #2
    Sencha User
    Join Date
    Feb 2011
    Posts
    111
    Answers
    5
    Vote Rating
    0
    sissonb is on a distinguished road

      0  

    Default


    Currently I am doing it this way, but really don't like the solution.
    Code:
    new Ext.form.Text({
                name : 'referredFrom',
                id : 'referredFrom',
                label: 'Account Number',
                listeners:{
                    keyup:function() {
    
    
                        if (this.getValue() === "") {
                            var defaultClass = "x-input-text";
                            Ext.getCmp("referredFrom").el.dom.children[1].children[0].setAttribute("class", defaultClass);
                        }
                        else {
                            var unknownClass = "x-input-text unknown";
                            Ext.getCmp("referredFrom").el.dom.children[1].children[0].setAttribute("class", unknownClass);
                        }
                    }
                }
            });
    If there is a better way please let me know.
    Thanks

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi