diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-03-10 10:49:18 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-03-10 10:49:18 -0400 |
commit | 36b92359be479b92b5adcbdc669576e61d01f74a (patch) | |
tree | 1af7a5b935c270a1a5348423a11e8f647ed4ad79 /demo | |
parent | db7cd221444afce64803e66594d56dc8e7a0843c (diff) |
Alert demo
Diffstat (limited to 'demo')
-rw-r--r-- | demo/alert.ur | 3 | ||||
-rw-r--r-- | demo/alert.urp | 2 | ||||
-rw-r--r-- | demo/alert.urs | 1 | ||||
-rw-r--r-- | demo/prose | 6 |
4 files changed, 12 insertions, 0 deletions
diff --git a/demo/alert.ur b/demo/alert.ur new file mode 100644 index 00000000..0f82e4bb --- /dev/null +++ b/demo/alert.ur @@ -0,0 +1,3 @@ +fun main () = return <xml><body> + <button value="Click me!" onclick={alert "You clicked me!"}/> +</body></xml> diff --git a/demo/alert.urp b/demo/alert.urp new file mode 100644 index 00000000..5a85a04e --- /dev/null +++ b/demo/alert.urp @@ -0,0 +1,2 @@ + +alert diff --git a/demo/alert.urs b/demo/alert.urs new file mode 100644 index 00000000..6ac44e0b --- /dev/null +++ b/demo/alert.urs @@ -0,0 +1 @@ +val main : unit -> transaction page @@ -185,3 +185,9 @@ crud1.urp crud2.urp <p>This example shows another application of <tt>Crud.Make</tt>. We mix one standard column with one customized column. We write an underscore for the <tt>Inject</tt> field of meta-data, since the type class facility can infer that witness.</p> + +alert.urp + +<p>Ur/Web makes it easy to write code whose execution should be distributed between the web server and client web browsers. Server-side code is compiled to efficient native code, and client-side code is compiled to JavaScript. Ur/Web programmers don't need to worry about these details, because the language and standard library provide a uniform ML-like interface for the whole process.</p> + +<p>Here's an example of a button that, when clicked, opens an alert dialog on the client.</p> |