Results 1 to 4 of 4

Thread: Textfield with inputType = file CSS

  1. #1
    Sencha User
    Join Date
    Dec 2008
    Posts
    73
    Vote Rating
    0
      0  

    Default Textfield with inputType = file CSS

    Hi, I noticed that if I create a textfield in this manner:

    Code:
    ..., {
            xtype : 'textfield',
            inputType : 'file'
            id : 'fileUploadField'
    }
    The resulting textfield and browse button are not CSS-formatted and look significantly different from other Extjs buttons / text fields. Does anyone know how to apply them look like the standard extjs components?

    Thanks a lot!

  2. #2
    Sencha User
    Join Date
    Dec 2008
    Posts
    73
    Vote Rating
    0
      0  

    Default

    No one? Can I at least know if this is a bug, and if there are any workarounds for it?
    Last edited by tryanDLS; 6 Feb 2009 at 8:43 AM. Reason: Moved to correct forum

  3. #3
    Sencha User carol.ext's Avatar
    Join Date
    Jun 2007
    Location
    Littleton, Colorado, USA
    Posts
    708
    Vote Rating
    36
      0  

    Default

    Take a look at the File upload example available from the Ext JS Samples page.

    The custom component js and css (! don't miss the required css !) is available in the examples directory of the standard download of 2.2/2.2.1.

  4. #4
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,615
    Vote Rating
    54
      0  

    Default

    Quote Originally Posted by cdeguzman View Post
    Hi, I noticed that if I create a textfield in this manner:

    Code:
    ..., {
            xtype : 'textfield',
            inputType : 'file'
            id : 'fileUploadField'
    }
    The resulting textfield and browse button are not CSS-formatted and look significantly different from other Extjs buttons / text fields. Does anyone know how to apply them look like the standard extjs components?

    Thanks a lot!
    AFAIK, it's a security feature imposed by the browser. You don't want "disguised" file inputs stealing files from your disk because they look like something else.

Posting Permissions

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