0
Вот код, который я использовал, чтобы показать детали от JSON, Все детали покажутся правильно, кроме image.When я пытаюсь показать изображение, которое не отображается на изображении.Назначение Base 64 преобразованное изображение из JSON
JSON МЕТОД
Ext.Ajax.request({
url: App.gvars.apiurl + 'ShowItemsByItemID/userID='+App.gvars.userid+'/itemID='+itemID, // url : this.getUrl(),
method: "GET",
useDefaultXhrHeader: false,
withCredentials: true,
success: function (response) {
var respObj = Ext.JSON.decode(response.responseText);
Ext.getCmp('myitemname').setValue(respObj[0].itemName);
Ext.getCmp('myitemdesc').setValue(respObj[0].itemDesc);
Ext.getCmp('myitemprice').setValue(respObj[0].itemPrice);
Ext.getCmp('myshopurl').setValue(respObj[0].itemAddress);
Ext.getCmp('myproductpic').setValue(respObj[0].itemImage); //Here the image getting
},
failure: function (response) {
alert(response.responseText);
}
});
Здесь панель
{
xtype: 'panel',
height:'100px',
docked: 'bottom',
html:'<div align="center" style="padding-top:30px;"><img src="resources/img/icon1.png" id="myproductpic" /> <img src="resources/img/icon2.png" id="myimglocation" /></div>'
}
Как показать base64 конвертируется изображение в 'myproductpic' area.Please помочь мне решить
нет его не работает – Fazil
@Fazil дал мне тест. сообщение, что base64 строка здесь – Viswa
вы можете получить строку from pastebin.com/yVkn4rsf – Fazil