blob: f8d12183f00119c9bc086e5abb0c85a5045b014a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
fun main () : transaction page =
let
fun handler r = return <xml>
<head>
<meta name={blessMeta r.Nam} content={r.Content}/>
<title>Testing <meta> tags</title>
</head>
<body>
<p>Did it work?</p>
</body>
</xml>
fun handler2 r =
case checkMeta r.Nam of
None => error <xml>Oh, that name won't do at all.</xml>
| Some name =>
return <xml>
<head>
<meta name={name} content={r.Content}/>
<title>Testing <meta> tags</title>
</head>
<body>
<p>Did it work?</p>
</body>
</xml>
in
return <xml>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Testing <meta> tags</title>
</head>
<body>
<p>Did it work?</p>
<form>
Name: <textbox{#Nam}/><br/>
Content: <textbox{#Content}/><br/>
<submit action={handler}/>
</form>
<form>
Name: <textbox{#Nam}/><br/>
Content: <textbox{#Content}/><br/>
<submit action={handler2}/>
</form>
</body>
</xml>
end
|