summaryrefslogtreecommitdiffstats
path: root/third_party/jstemplate/tutorial_examples/03-environ.html
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/jstemplate/tutorial_examples/03-environ.html')
-rw-r--r--third_party/jstemplate/tutorial_examples/03-environ.html25
1 files changed, 25 insertions, 0 deletions
diff --git a/third_party/jstemplate/tutorial_examples/03-environ.html b/third_party/jstemplate/tutorial_examples/03-environ.html
new file mode 100644
index 0000000..2937a5c
--- /dev/null
+++ b/third_party/jstemplate/tutorial_examples/03-environ.html
@@ -0,0 +1,25 @@
+<html>
+<head><title>Address Book Using Jstemplates</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">
+ function jsinit() {
+ var mydata = {dataProperty:'Nonny'};
+ var context = new JsEvalContext(mydata);
+ context.setVariable('declaredVar','Ho');
+ var template = document.getElementById('witha');
+ jstProcess(context, template);
+ }
+ </script>
+ <link rel="stylesheet" type="text/css" href="css/maps2.deb.css"/>
+</head>
+<body onload="jsinit()">
+
+<div id="witha">
+<div id="Hey" jscontent="this.parentNode.id + this.id + dataProperty +
+ $this.dataProperty + declaredVar"></div>
+</div>
+
+</body>
+</html>