1. #1
    Ext JS Premium Member
    Join Date
    Dec 2011
    Posts
    231
    Vote Rating
    2
    nicolabaldo is on a distinguished road

      0  

    Default enable/disable Ext.form.field.file

    enable/disable Ext.form.field.file


    I use Extjs 4.1.2.
    This is my code:

    //myId is the id of Ext.form.field.file

    Ext.getCmp(myId).setDisabled(true);
    Ext.getCmp(myId).setDisabled(false);

    After last statement If I try to click the button, the open dialog doesn't appear. Why?

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,154
    Vote Rating
    475
    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


    How does this work for you?

    Code:
    var form = Ext.create('Ext.form.Panel', {
        title: 'Upload a Photo',
        width: 400,
        bodyPadding: 10,
        frame: true,
        renderTo: Ext.getBody(),
        items: [{
            xtype: 'filefield',
            name: 'photo',
            fieldLabel: 'Photo',
            labelWidth: 50,
            msgTarget: 'side',
            allowBlank: false,
            anchor: '100%',
            buttonText: 'Select Photo...'
        }]
    });
    
    var ff = form.down('filefield');
    ff.setDisabled(true);
    
    setTimeout(function(){
        ff.setDisabled(false);
    }, 1000);
    ‚Äč
    Scott.

  3. #3
    Ext JS Premium Member
    Join Date
    Dec 2011
    Posts
    231
    Vote Rating
    2
    nicolabaldo is on a distinguished road

      0  

    Default


    Thanks for reply me but it doesn't work...

  4. #4

  5. #5
    Ext JS Premium Member
    Join Date
    Dec 2011
    Posts
    231
    Vote Rating
    2
    nicolabaldo is on a distinguished road

      0  

    Default


    no...

  6. #6
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    20
    Vote Rating
    0
    quta is on a distinguished road

      0  

    Default


    maybe try this :

    Ext.getCmp(myId).enabe(true);
    Ext.getCmp(myId).disable(true);

  7. #7
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,154
    Vote Rating
    475
    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


    Please download the latest nightly build from portal. It tested fine
    ext-4.1-20120920.zip

    I was able to verify that previous build did have the issue you describe.

    Scott.