Results 1 to 2 of 2

Thread: How to disable file upload field and file upload icon

  1. #1
    Sencha User
    Join Date
    May 2010
    Posts
    15

    Default How to disable file upload field and file upload icon

    How to disable file upload field and file upload icon on click on radio button NO ,it disables only file upload field and keep enable the icon,it dosen't hide file upload field icon
    this is the code i am using
    {
    xtype: 'radiogroup',
    fieldLabel: 'Documents Enclosed',
    items: [
    {boxLabel: 'Yes', id:'enc1', name: 'rb-auto', inputValue: 1, checked: true},
    {boxLabel: 'No', id:'enc2', name: 'rb-auto', inputValue: 0}
    ],
    listeners:{
    change: function(radiogroup,radio)
    {
    var te=Ext.getCmp('enc1').getValue();
    if(te==true )
    {
    Ext.getCmp('file1').setValue('');
    Ext.getCmp('file1').setDisabled(false);
    Ext.getCmp('file_upload').Visible(true);
    }
    else
    {
    Ext.getCmp('file1').setValue('NA');
    Ext.getCmp('file1').setDisabled(true);
    Ext.getCmp('file_upload').Visible(false); // this makes file upload icon invisible but when i click on
    //that invisible icon it opens file upload window
    }
    }
    }
    }
    {
    xtype: 'fileuploadfield',
    id: 'file1',
    fieldLabel: 'Upload Document',
    style: 'text-align: left',
    buttonText: '',
    allowBlank: false,
    width: 135,
    buttonCfg: {
    iconCls: 'upload-icon',
    id:'file_upload'
    }
    }
    is there any way to remove the icon dynamically on click of radio button NO
    Any help is greatly appreciated
    Thanks A lot
    Attached Images Attached Images

  2. #2
    Sencha User
    Join Date
    May 2010
    Posts
    15

    Default

    Anyone has idea ..?? please help me

Similar Threads

  1. How to disable file upload field and file upload icon
    By mypen in forum Ext 3.x: Help & Discussion
    Replies: 11
    Last Post: 18 Feb 2011, 7:45 AM
  2. How to disable file upload field and file upload icon
    By mypen in forum Sencha Touch 1.x: Discussion
    Replies: 3
    Last Post: 26 Jan 2011, 1:04 AM
  3. how can i disable File Upload Field?
    By HyGy in forum Ext 3.x: Help & Discussion
    Replies: 5
    Last Post: 25 Jan 2011, 12:31 PM
  4. Replies: 2
    Last Post: 23 Aug 2009, 6:18 PM
  5. file upload field?
    By spasmoid in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 30 Apr 2007, 9:12 PM

Posting Permissions

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