1. #1
    Ext User
    Join Date
    Nov 2008
    Posts
    9
    Vote Rating
    1
    frankys9 is on a distinguished road

      1  

    Default set button hidden to false

    set button hidden to false


    Hello,

    i created a ExtJS formpanel with 2 hidden buttons. How can i change the hidden value from true to false?

    Code:
    buttons:[{
                text:'speichern',
                id:'create',
                hidden:true,
                handler:function(){
                    myContacts.getForm().submit({
                        method:'POST',
                        params:{'event':'createContact'},
                        success:function(r){
                            win.hide()
                        }
                    })
                }
            }]
    Thanks for your Help!!
    Frank

  2. #2
    Ext User zhegwood's Avatar
    Join Date
    Dec 2007
    Location
    Boulder, CO Suburbia (Lafayette)
    Posts
    388
    Vote Rating
    1
    zhegwood is on a distinguished road

      0  

    Default


    Code:
    buttons[0].setVisibility(true)

  3. #3
    Ext User
    Join Date
    Nov 2008
    Posts
    9
    Vote Rating
    1
    frankys9 is on a distinguished road

      0  

    Default


    I tryed your code and become an error: 'button is not defined'

    My complete form:
    Code:
    var myContacts = new Ext.FormPanel({
            url:'view/userContacts.cfm',
            bodyStyle:'padding:5px',
            defaults: {width: 230},
            id:'myContacts',
            items:[{
                xtype:'hidden',
                name:'ident',
                id:'ident',
                fieldLabel:'',
            },{
                xtype:'textfield',
                name:'vorname',
                id:'vorname',
                fieldLabel:'Vorname'
            },{
                xtype:'textfield',
                name:'nachname',
                id:'nachname',
                fieldLabel:'Nachname'
            },{
                xtype:'textfield',
                name:'mobil',
                id:'mobil',
                fieldLabel:'Handy'
            },{
                xtype:'combo',
                name:'type',
                id:'type',
                mode: 'local',
                store: type,
                displayField:'type',
                fieldLabel:'Kontakttype'
            },{
                xtype:'textarea',
                name:'memo',
                id:'memo',
                fieldLabel:'Info'
            }],
            buttons:[{
                text:'speichern',
                id:'create',
                hidden:true,
                handler:function(){
                    myContacts.getForm().submit({
                        method:'POST',
                        params:{'event':'createContact'},
                        success:function(r){
                            win.hide()
                        }
                    })
                }
            }]
        });
    Any other solution?

    Thanks
    Frank

  4. #4
    Ext User zhegwood's Avatar
    Join Date
    Dec 2007
    Location
    Boulder, CO Suburbia (Lafayette)
    Posts
    388
    Vote Rating
    1
    zhegwood is on a distinguished road

      1  

    Default


    Code:
    myContacts.buttons[0].setVisible(true);
    Whoops... It's setVisible, not setVisibility for buttons. Also, if you're getting undefined errors, check the rendered property. If it's false, that's probably the problem. When are you trying to show the button, anyway?

  5. #5
    Ext User
    Join Date
    Nov 2008
    Posts
    9
    Vote Rating
    1
    frankys9 is on a distinguished road

      0  

    Default


    Hello zhegwood,

    thanks for your Help. My Problem is fixed now.

    Frank

Thread Participants: 1

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..."