PDA

View Full Version : Problem cache in upload photo



fabiojpoli
25 Oct 2010, 11:14 AM
Morning, got one form to cadastre user, this cadastre is possible insert photo, to inserting gives alright but has one hitch while editing a record in form appears photo of User, I change photo this User andI naum wanted clean totally caching automatico so the User not lose session but precise which at editing the regsitro by impairing photo be instantly upgraded div of form that possesses photo. Currently mine cod ta thus:


this.panelFotoMembro = new Ext.Panel({
width: 98,
height: 40,
bodyStyle: 'padding: 5px 0px 5px 0px; align:center; margin-right: 10px;',
flex: 1,
border: false,
items: [new Ext.BoxComponent({
autoEl: {
tag: 'img',
src: 'fotos/' + this.idMembro + '.jpg',
id: 'fotoMembro'
}
})]
});


var el = Ext.get("fotoMembro");
el.set({src: 'fotos/'+ this.idMembro +'.jpg'});

Thanks!

Animal
25 Oct 2010, 11:45 AM
el.dom.src = 'fotos/'+ this.idMembro +'.jpg?' + new Date().getTime();

fabiojpoli
25 Oct 2010, 11:53 AM
Perfect Animal!

Very nice!

Thanks!