-
Notifications
You must be signed in to change notification settings - Fork 9
/
get-btn.prg
63 lines (36 loc) · 996 Bytes
/
get-btn.prg
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// {% LoadHrb( 'lib/tweb/tweb.hrb' ) %}
#include {% TWebInclude() %}
function main()
LOCAL o
DEFINE WEB oWeb TITLE 'Get Button' INIT
DEFINE FORM o
INIT FORM o
ROWGROUP o
GET VALUE '123' GRID 12 OF o
ENDROW o
ROWGROUP o
GET ID 'myid' VALUE '123' GRID 12 LABEL 'Id.' ;
BUTTON 'GetId' ACTION 'GetId()' OF o
ENDROW o
ROWGROUP o
GET ID 'myid' VALUE '123' GRID 12 LABEL 'Id.' ;
BUTTON 'GetId', 'Test' ACTION 'GetId()', 'TestBtn()' OF o
ENDROW o
ROWGROUP o
GET ID 'myid' VALUE '123' GRID 12 LABEL 'Id.' ;
BUTTON 'GetId', 'Test', '<i class="fas fa-search"></i>' ;
ACTION 'GetId()', 'TestBtn()', "MsgInfo(' Search...')" OF o
ENDROW o
HTML o
<script>
function GetId() {
var cId = $('#myid').val()
MsgInfo( cId )
}
function TestBtn() {
alert( 'Button...' )
}
</script>
ENDTEXT
END FORM o
retu nil