1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0//EN">
6 <style type=
"text/css">
9 font-family: verdana
, sans-serif
;
29 text-decoration:underline
;
34 text-decoration: none
;
47 border-bottom-width:1px;
48 border-bottom-style:dotted
;
64 <table width=
"90%" border=
"0" cellspacing=
"1" cellpadding=
"5">
67 <big><tt>Global.helma.Html.prototype.radioButton
(param)
</tt></big><br>
73 Renders an x/html radiobutton input tag
<br><br>
76 <li><b>Parameter
</b> <code>{Object}
</code>:
<br/>
77 param An object containing the tag attributes
88 <table width=
"90%" border=
"0" cellspacing=
"1" cellpadding=
"5">
90 <td>Sourcecode in /root/helma-
1.6.1/modules/helma/Html.js:
91 <pre><font color=
"#aaaaaa">360:
</font> helma.Html.prototype.radioButton = function(param) {
92 <font color=
"#aaaaaa">361:
</font> if (!param) {
93 <font color=
"#aaaaaa">362:
</font> res.write(
<font color=
"#9999aa">"[Html.radioButton: insufficient arguments]
"</font>);
94 <font color=
"#aaaaaa">363:
</font> return;
95 <font color=
"#aaaaaa">364:
</font> }
96 <font color=
"#aaaaaa">365:
</font> var attr = Object.prototype.reduce.call(param);
97 <font color=
"#aaaaaa">366:
</font> attr.type =
<font color=
"#9999aa">"radio
"</font>;
98 <font color=
"#aaaaaa">367:
</font> if (attr.selectedValue != null) {
99 <font color=
"#aaaaaa">368:
</font> if (attr.value == attr.selectedValue)
100 <font color=
"#aaaaaa">369:
</font> attr.checked =
<font color=
"#9999aa">"checked
"</font>;
101 <font color=
"#aaaaaa">370:
</font> else
102 <font color=
"#aaaaaa">371:
</font> delete attr.checked;
103 <font color=
"#aaaaaa">372:
</font> delete attr.selectedValue;
104 <font color=
"#aaaaaa">373:
</font> }
105 <font color=
"#aaaaaa">374:
</font> this.tag(
<font color=
"#9999aa">"input
"</font>, attr);
106 <font color=
"#aaaaaa">375:
</font> return;
107 <font color=
"#aaaaaa">376:
</font> }