Mercurial > urweb
comparison demo/url.ur @ 774:412ccd97ab71
url demo
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 03 May 2009 12:24:39 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
773:74a090ff296e | 774:412ccd97ab71 |
---|---|
1 fun yourChoice r = return <xml><body> | |
2 {case checkUrl r.Url of | |
3 None => <xml>You aren't allowed to link to there.</xml> | |
4 | Some url => <xml><a href={url}>Enjoy!</a></xml>} | |
5 </body></xml> | |
6 | |
7 fun main () = return <xml><body> | |
8 <a href="http://en.wikipedia.org/wiki/Type_inference">Learn something</a><br/> | |
9 <br/> | |
10 <form> | |
11 URL of your choice: <textbox{#Url}/> <submit action={yourChoice}/> | |
12 </form> | |
13 </body></xml> |