Skip to content

Commit e6ea738

Browse files
committed
Minor documentation update
1 parent 157afe9 commit e6ea738

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

src/form/Form.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,24 @@ javaxt.dhtml.Form = function (parent, config) {
2323

2424

2525
/** An array of buttons that will be placed at the bottom of the form
26-
* (e.g. submit, cancel, reset).
26+
* (e.g. submit, cancel, reset). Example:
27+
<pre>
28+
buttons: [
29+
{
30+
name: "Submit",
31+
onclick: function(){
32+
var values = form.getData();
33+
//TODO: validate form data
34+
}
35+
},
36+
{
37+
name: "Reset",
38+
onclick: function(){
39+
form.clear();
40+
}
41+
}
42+
]
43+
</pre>
2744
*/
2845
buttons: [],
2946

src/window/Window.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,17 @@ javaxt.dhtml.Window = function(parent, config) {
5656
footer: null,
5757

5858
/** Buttons to put in the footer. Only rendered if no "footer" config is
59-
* defined.
59+
* defined. Example:
60+
<pre>
61+
buttons: [
62+
{
63+
name: "OK",
64+
onclick: function(){
65+
win.close();
66+
}
67+
}
68+
]
69+
</pre>
6070
*/
6171
buttons: [],
6272

0 commit comments

Comments
 (0)