javascript - Filefield with extjs 4.2 without fakepath -
i want extjs 4.2
i use component in attachment :
{ xtype: 'filefield', id: 'file6', fieldlabel: 'test ', labelwidth: 100, msgtarget: 'side', allowblank : false, anchor: '100%', buttontext: 'upload' },
i want have attachment component display name of file without text : c /fakepath
there isn't built-in way accomplish however, can find/replace fakepath , remove. impelmented on change
event. here example:
listeners: { change: function(fld, value) { var newvalue = value.replace(/c:\\fakepath\\/g, ''); fld.setrawvalue(newvalue); } }
i created sencha fiddle demonstrating working example
Comments
Post a Comment