comparison demo/form.ur @ 406:a71600cac815

Form example
author Adam Chlipala <adamc@hcoop.net>
date Tue, 21 Oct 2008 17:30:06 -0400
parents
children
comparison
equal deleted inserted replaced
405:948315ea84c3 406:a71600cac815
1 fun handler r = return <xml><body>
2 <table>
3 <tr> <th>A:</th> <td>{[r.A]}</td> </tr>
4 <tr> <th>B:</th> <td>{[r.B]}</td> </tr>
5 <tr> <th>C:</th> <td>{[r.C]}</td> </tr>
6 </table>
7 </body></xml>
8
9 fun main () = return <xml><body>
10 <form>
11 <table>
12 <tr> <th>A:</th> <td><textbox{#A}/></td> </tr>
13 <tr> <th>B:</th> <td><textbox{#B}/></td> </tr>
14 <tr> <th>C:</th> <td><checkbox{#C}/></td> </tr>
15 <tr> <th/> <td><submit action={handler}/></td> </tr>
16 </table>
17 </form>
18 </body></xml>