blob: 48c04f1e9ac33001299c495ef61edcd9984d5339 (
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
|
fun main () =
s <- source (Some "B");
r <- source None;
let
val onc = v <- get s; alert ("Now it's " ^ show v)
val onc_r = v <- get r; alert ("Changed to " ^ show v)
in
return <xml><body>
<h1>First group</h1>
<label>Wilbur <cradio source={s} value="A" onchange={onc}/></label>
<label>Walbur <cradio source={s} value="B" onchange={onc}/></label>
<div>
Hello, I'm <dyn signal={s <- signal s; return <xml>{[s]}</xml>}/>. I'll be your waiter for this evening.
</div>
<h1>Second group</h1>
<label>X <cradio source={r} value="X" onchange={onc_r}/></label>
<label>Y <cradio source={r} value="Y" onchange={onc_r}/></label>
<label>Z <cradio source={r} value="Z" onchange={onc_r}/></label>
<div>Value: <dyn signal={r <- signal r; return <xml>{[r]}</xml>}/></div>
</body></xml>
end
|