kazu2012 / trimpath

Automatically exported from code.google.com/p/trimpath
0 stars 0 forks source link

Problem with IE #24

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
IE 8 was not rendering the output of the template because the content
variable seen below in the template.js file was not initialized.

TrimPath.parseDOMTemplate = function(elementInnerHTML, optDocument, optEtc) {

//********* CUSTOMIZATION *********//

        content = elementInnerHTML; // Like textarea.innerHTML.
....

Worked when I initialized it.
var content = elementInnerHTML; // Like textarea.innerHTML.

Original issue reported on code.google.com by smmu...@gmail.com on 15 May 2009 at 3:13

GoogleCodeExporter commented 8 years ago
Internet Explorer 8 fails to process templates...

Example code:

var tpl = TrimPath.parseTemplate( "{for x in data}${x}{/for}" );
var a = { data: [ "a", "b", "C" ] };
document.write( tpl.process( a ) );

Browser output is "[ERROR: TypeError: 'data' is not defined; 'data' is not 
defined]"
( I translated the error message from Finnish to English ), output should be 
"abC".

Can someone help me?

Original comment by henry.sa...@gmail.com on 30 Jul 2009 at 3:52

GoogleCodeExporter commented 8 years ago
can you trace it in firebug lite?
http://getfirebug.com/lite.html

Original comment by kucerari...@gmail.com on 5 Oct 2009 at 2:08