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.button
(param)
</tt></big><br>
73 Renders an x/html button 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">426:
</font> helma.Html.prototype.button = function(param) {
92 <font color=
"#aaaaaa">427:
</font> if (!param) {
93 <font color=
"#aaaaaa">428:
</font> res.write(
<font color=
"#9999aa">"[Html.button: insufficient arguments]
"</font>);
94 <font color=
"#aaaaaa">429:
</font> return;
95 <font color=
"#aaaaaa">430:
</font> }
96 <font color=
"#aaaaaa">431:
</font> var attr = Object.prototype.reduce.call(param);
97 <font color=
"#aaaaaa">432:
</font> attr.type =
<font color=
"#9999aa">"button
"</font>;
98 <font color=
"#aaaaaa">433:
</font> if (!attr.name)
99 <font color=
"#aaaaaa">434:
</font> attr.name = attr.type;
100 <font color=
"#aaaaaa">435:
</font> attr.value = (attr.value != null) ? encodeForm(attr.value) : attr.type;
101 <font color=
"#aaaaaa">436:
</font> this.tag(
<font color=
"#9999aa">"input
"</font>, attr);
102 <font color=
"#aaaaaa">437:
</font> return;
103 <font color=
"#aaaaaa">438:
</font> }