comparison tests/form2.lac @ 144:f0d3402184d1

Simple forms work
author Adam Chlipala <adamc@hcoop.net>
date Tue, 22 Jul 2008 15:12:20 -0400
parents
children
comparison
equal deleted inserted replaced
143:4b9c2bd6157c 144:f0d3402184d1
1 val handler1 = fn r => <html><body>
2 <li> Name: {cdata r.Nam}</li>
3 <li> Word: {cdata r.Word}</li>
4 </body></html>
5
6 val handler2 = fn r => <html><body>
7 <li> Name: {cdata r.Nam}</li>
8 <li> Ward: {cdata r.Ward}</li>
9 </body></html>
10
11 val main : unit -> page = fn () => <html><body>
12 <lform>
13 Name: <textbox{#Nam} /><br/>
14 Word: <textbox{#Word} /><br/>
15
16 <submit action={handler1}/>
17 </lform>
18
19 <lform>
20 Name: <textbox{#Nam} /><br/>
21 Word: <textbox{#Ward} /><br/>
22
23 <submit action={handler2}/>
24 </lform>
25 </body></html>