olado/doT

helper function for people

cekvenich opened this issue · 1 comments

You may find this helpful:

function bind(eID, field, value) {
	let tmpl = document.getElementById(eID)
	let doIt = doT.template(tmpl.innerHTML)
	let bind = new Object()
	bind[field] = value
	let res = doIt(bind)
	tmpl.innerHTML=res
}

That is all.

sorry, I do not understand what problem it solves - can you please explain?