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

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -