view tests/radio.ur @ 1733:ab24a7cb2a64

'urweb daemon start' and 'urweb daemon stop'
author Adam Chlipala <adam@chlipala.net>
date Sun, 29 Apr 2012 16:23:03 -0400
parents a1a1d66aebac
children
line wrap: on
line source
fun handler x = return <xml><body>
  You entered: {[case x.A of
                     None => "nothing at all"
                   | Some v => v]}
</body></xml>

fun main () = return <xml><body>
  <form>
    <radio{#A}>
      <li><radioOption value="A"/>A</li>
      <li><radioOption value="B"/>B</li>
    </radio>
    <submit action={handler}/>
  </form>
</body></xml>