I have a problem with inserting images into a form. The addresses of the images are hosted on the database and I have to do the load dynamically through a JSON. I've ridden the JSON in PHP. I leave a pic as have to be, and it succeeds but not dynamically.
Also left the code to achieve load images into the form. It gives reference to what I have to do dynamically
{
fieldLabel : 'Icono',
xtype : 'panel',
id : 'panelIcon',
width: 400,
height: 48,
value: 'valorIdIcon',
autoScroll:true,
layout: {
type: 'table',
columns: 15
},
defaults: {
// applied to each contained panel
bodyStyle:'background-color:#0099FF',
style: 'border-color:#b5b8c8'
},
items:
[{
id: 'acces.jpg',
width: 32,
html: '<img src="../../Images/IconSelect/acces.jpg" onclick="javascript:verID(this);"/>',
listeners:{
render: function(e){
e.body.on('click',function(){
valorIdIcon = e.body.parent().parent().id;
});
},
}
},
Someone give me a hand? Thanks You!
I finished doing it from the Server-Side with PHP, wrote the code from PHP and return to front-end and did a eval()
.