PDA

View Full Version : Trouble loading html (img tags) from sql to a panel



strato1986
12 Aug 2009, 3:21 PM
Im having troubles with the img tags, it does not show the images! only when i manually load them with the browser's context menu, anyone knows why? here i put the code...

The load event:


load: function(store,record,options){

var titulo = Ext.util.Format.htmlDecode(record[0].json.titulo);
var articulo = Ext.util.Format.htmlDecode(record[0].json.articulo);
var fecha = record[0].json.fecha;
getTemplate().overwrite(Ext.getCmp('preview-articulos').body,{
'Titulo':titulo,
'Cuerpo':articulo,
'Fecha':fecha});

}


The template:


<div id="preview-tpl" style="display:none;">
<div class="post-data">

<span class="post-date">{Fecha}</span>
<h3 class="post-title">{Titulo}</h3>
<h4 class="post-author">por {author:defaultValue("Desconocido")}</h4>
</div>
<div class="post-body">{Cuerpo}</div>
</div>

chesstrix
12 Aug 2009, 8:25 PM
You'll need to include your json (or a working example) to workout what is going on, but


style="display:none;"

isn't going to help, unless you are manually setting this somewhere.