-
6 Feb 2009 1:31 AM #1
File textfield css
File textfield css
Hi, I noticed that if I create a textfield in this manner:
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?Code:..., { xtype : 'textfield', inputType : 'file' , id : 'fileUploadField'}
Thanks a lot!
-
6 Feb 2009 1:35 AM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 44
See examples/form/file-upload.html (it uses FileUploadField.js and file-upload.css).
-
6 Feb 2009 3:48 AM #3
Thanks, Condor. It doesn't seem to be formatting correctly either, though. I'm seeing two textfields and two buttons, with one pair css-formatted and the other one not formatted. When I select a file with either button, both textfields are populated with the selected filename.
Code:...
xtype :'panel', layout : 'table', layoutConfig : {columns : 4}, border :false, height: '100%', width : '100%', items : [new Ext.form.FileUploadField({ id : 'fileUploadField', width: 100 }),...
The only difference I'm seeing is that we extended Ext.Window and added the declaration above in the overridden initComponent method. Does this matter in implementing this component?
-
6 Feb 2009 3:50 AM #4Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 44
Did you also include file-upload.css?
-
6 Feb 2009 3:58 AM #5
No, can you tell me where do download it? It doesn't seem to be available from the page you linked.

-
6 Feb 2009 4:09 AM #6
Oops, never mind
I got it off another forum post.
Thanks a lot!
-
6 Feb 2009 4:33 AM #7Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 44
Where to download it? It's part of the standard Ext JS SDK, so you probably already have it on your system!
(it's located in examples/form/file-upload.css).
-
6 Feb 2009 4:42 AM #8
Nope, I don't have a copy of that file in my system. I just copied the necessary selectors off a different post.
Another question, if you don't mind... Textfields with inputType = file are submittable using DWR using the following code:
However, this doesn't seem to work with the FileUploadField component. Is there a way to make FileUploadField compatible with DWR ?Code:... { xtype : 'textfield', inputType : 'file', id : 'fileUploadField' } , { xtype : 'button', text : 'Submit', handler: function() { var file = dwr.util.getValue('fileUploadField'); dwrClass.dwrMethod(file, columns, function(data) { } } }
-
6 Feb 2009 4:44 AM #9Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 44
Code:var file = dwr.util.getValue('fileUploadField-file');
-
6 Feb 2009 4:51 AM #10


Reply With Quote