summaryrefslogtreecommitdiff
path: root/demo/increment.ur
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-04-16 15:38:01 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-04-16 15:38:01 -0400
commit7f7d05616c489b6039bc1e8824c00b43209109c2 (patch)
tree319480b616f48c0f2ec38e1673c2b89a1de79125 /demo/increment.ur
parent55d10dd587a94d356096c2dfc39306c14b55c7bf (diff)
Add more buttons to demo, to avoid effectful GET
Diffstat (limited to 'demo/increment.ur')
-rw-r--r--demo/increment.ur6
1 files changed, 5 insertions, 1 deletions
diff --git a/demo/increment.ur b/demo/increment.ur
index a74e80df..36b8191f 100644
--- a/demo/increment.ur
+++ b/demo/increment.ur
@@ -2,9 +2,13 @@ sequence seq
fun increment () = nextval seq
-fun main () =
+fun action () =
src <- source 0;
return <xml><body>
<dyn signal={n <- signal src; return <xml>{[n]}</xml>}/>
<button value="Update" onclick={n <- increment (); set src n}/>
</body></xml>
+
+fun main () = return <xml><body>
+ <form><submit value="Begin demo" action={action}/></form>
+</body></xml>