view tests/radio.ur @ 1841:184d00f7be74

Add more HTML singleton tags, anticipating that others may make them available via the FFI
author Adam Chlipala <adam@chlipala.net>
date Mon, 31 Dec 2012 09:04:35 -0500
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>