X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=Roo%2FDomTemplate.js;h=3ffe06071494d9b7b4b7d78fc4e2adccc61c2b14;hp=aef88102a018c473e9ee691c310a3982b6807c7f;hb=75cbc4ce04c9c01ac47671cb01320ce699128d00;hpb=56fd4ac90718063136cdd6f770b5f3fa5d4760c8 diff --git a/Roo/DomTemplate.js b/Roo/DomTemplate.js index aef88102a0..3ffe060714 100644 --- a/Roo/DomTemplate.js +++ b/Roo/DomTemplate.js @@ -100,15 +100,20 @@ Roo.extend(Roo.DomTemplate, Roo.Template, { // covert the html into DOM... var doc = false; + var div =false; try { doc = document.implementation.createHTMLDocument(""); + doc.documentElement.innerHTML = this.html ; + div = doc.documentElement; } catch (e) { - // old IE... - doc = new ActiveXObject("htmlfile"); + // old IE... - nasty -- it causes all sorts of issues.. with + // images getting pulled from server.. + div = document.createElement('div'); + div.innerHTML = this.html; } //doc.documentElement.innerHTML = htmlBody - var div = doc.documentElement; - div.innerHTML = this.html ; + + this.tpls = []; var _t = this; @@ -328,7 +333,7 @@ Roo.extend(Roo.DomTemplate, Roo.Template, { return "'"+ sep + udef_st + format + name + args + "))"+sep+"'"; } - if (args.length) { + if (args && args.length) { // called with xxyx.yuu:(test,test) // change to () return "'"+ sep + udef_st + name + '(' + args + "))"+sep+"'";