PDA

View Full Version : Ext template.overwrite in IE8



jserrano
5 Aug 2010, 7:23 AM
I am running into an issue where I first create and compile a template

var tmpl = new Ext.Template('<tr><td>{count}</td><td>{something}</td></tr>');
tmpl.compile();

and then later on I will use this template with template.overwrite(). In IE 8 this will throw an exception inside the overwrite method when it is trying to set the innerHTML on the dom object. The exception is "Unknown runtime error".

Does anyone have a work around?
Is this already a noted bug?

Animal
5 Aug 2010, 7:31 AM
IE does not do innerHTML in tables.

Condor
5 Aug 2010, 8:02 AM
For IE, your template must contain a <table> if it contains <tr> or <td> elements.

To render into an existing table, you first render the template to a temporary element and move the <tr> to the target table.