comparison tests/form3.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 handler3 = fn r => <html><body>
12 <li> Name: {cdata r.Nam}</li>
13 <li> Ward: {cdata r.Ward}</li>
14 <li> Words: {cdata r.Words}</li>
15 </body></html>
16
17 val main : unit -> page = fn () => <html><body>
18 <lform>
19 Name: <textbox{#Nam} /><br/>
20 Word: <textbox{#Word} /><br/>
21
22 <submit action={handler1}/>
23 </lform>
24
25 <lform>
26 Name: <textbox{#Nam} /><br/>
27 Word: <textbox{#Ward} /><br/>
28
29 <submit action={handler2}/>
30 </lform>
31
32 <lform>
33 Name: <textbox{#Nam} /><br/>
34 Ward: <textbox{#Ward} /><br/>
35 Words: <textbox{#Words} /><br/>
36
37 <submit action={handler3}/>
38 </lform>
39 </body></html>