blob: b264f3f2e57f218562a132103449ff13f2025310 [file] [log] [blame]
<head><title>Jstemplates: Quick example</title>
<script src="../util.js" type="text/javascript"></script>
<script src="../jsevalcontext.js" type="text/javascript"></script>
<script src="../jstemplate.js" type="text/javascript"></script>
<script type="text/javascript">
var tplData = "Joe User";
function showData() {
// This is the javascript code that processes the template:
var input = new JsEvalContext(tplData);
var output = document.getElementById('tpl');
jstProcess(input, output);
<body onload="showData()">
This is the template:
<div id="tpl">
Welcome <span jscontent="$this">
(This placeholder name will be replaced by the actual username.)