Mercurial > urweb
annotate demo/url.ur @ 1479:f561025bb68e
Workaround for old IE handling of <option> with no 'value' attribute
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sun, 26 Jun 2011 19:45:21 -0400 |
parents | 412ccd97ab71 |
children |
rev | line source |
---|---|
adamc@774 | 1 fun yourChoice r = return <xml><body> |
adamc@774 | 2 {case checkUrl r.Url of |
adamc@774 | 3 None => <xml>You aren't allowed to link to there.</xml> |
adamc@774 | 4 | Some url => <xml><a href={url}>Enjoy!</a></xml>} |
adamc@774 | 5 </body></xml> |
adamc@774 | 6 |
adamc@774 | 7 fun main () = return <xml><body> |
adamc@774 | 8 <a href="http://en.wikipedia.org/wiki/Type_inference">Learn something</a><br/> |
adamc@774 | 9 <br/> |
adamc@774 | 10 <form> |
adamc@774 | 11 URL of your choice: <textbox{#Url}/> <submit action={yourChoice}/> |
adamc@774 | 12 </form> |
adamc@774 | 13 </body></xml> |