PDA

View Full Version : Could i get template form html file?



zsumore
1 Nov 2008, 5:35 PM
I want to get template by :


DOM.getElementById("template");


not with:


private native String getTemplate() /*-{
var html = [
'<p>Name: {name}</p>',
'<p>Company: {company}</p>',
'<p>Location: {location}</p>',
'<p>Kids: ',
'<tpl for="kids" if="name==\'Darrell Meyer\'">',
'<tpl if="age > 1"><p>{#}. {parent.name}\'s kid - {name}</p></tpl>',
'</tpl></p>'
];
return html.join("");

}-*/;



How could i do?