]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/webapps/calculator/calculator.xml
New webapps.calculator demo
[factor.git] / extra / webapps / calculator / calculator.xml
diff --git a/extra/webapps/calculator/calculator.xml b/extra/webapps/calculator/calculator.xml
new file mode 100644 (file)
index 0000000..ed8e60d
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version='1.0' ?>
+
+<t:chloe xmlns:t="http://factorcode.org/chloe/1.0">
+
+       <head> <title>Calculator</title> </head>
+
+       <body>
+               <h1>Calculator</h1>
+
+               <t:form t:action="$calculator">
+
+                       <table>
+                               <tr><td>First value:</td><td> <t:field t:name="x" /> </td></tr>
+                               <tr><td>Second value:</td><td> <t:field t:name="y" /> </td></tr>
+                       </table>
+
+                       <input type="SUBMIT" value="Compute" />
+
+                       <t:if t:value="z">
+                               <br/>
+
+                               Result: <t:label t:name="z" />
+                       </t:if>
+
+               </t:form>
+       </body>
+
+</t:chloe>