PDA

View Full Version : Issue on file upload button.



innovista1
26 Nov 2013, 4:13 AM
Hello,

When we are facing a problem when I click attach button at that time browser is displaying for select and upload a file. We have used below code to upload a file.

items: [{
xtype: 'filefield',
minWidth: 90,
minHeight:25,
buttonOnly: true,
buttonText: '<b>'+ 'Attach' +'</b>',

}, },{
minWidth: 90,
minHeight:25,
text:'<b>'+ 'Remove'+'</b>',
handler : function() {
alert(" Under implementing >>>>>>");
}
},{
minWidth: 90,
minHeight:25,
text:'<b>'+ 'Upload'+'</b>',
handler : function() {
alert(" Under implementing >>>>>>");
}
}
]

In above underlined attach is not showing as a button it is showing as label. but functionality is working fine. any config is available to show the button. Please find the screen shot

scottmartin
26 Nov 2013, 9:26 AM
I do not see this in the following example, perhaps you have a different setup?



Ext.application({
name : 'Fiddle',

launch : function() {

Ext.create('Ext.form.Panel', {
title: 'Upload a Photo',
width: 400,
bodyPadding: 10,
frame: true,
renderTo: Ext.getBody(),
layout: 'hbox',
items: [{
xtype: 'filefield',
minWidth: 90,
minHeight:25,
buttonOnly: true,
buttonText: '<b>'+ 'Attach' +'</b>'
},{
xtype: 'button',
text : 'Button'
}]

});

}
});


Also, you may want to consider using CSS to change the button text attributes.