-
Notifications
You must be signed in to change notification settings - Fork 9
/
msgerror.prg
69 lines (42 loc) · 1.38 KB
/
msgerror.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
64
65
66
67
68
69
// {% LoadHrb( 'lib/tweb/tweb.hrb' ) %}
#include {% TWebInclude() %}
function main()
LOCAL o
DEFINE WEB oWeb TITLE 'MsgError()' INIT
DEFINE FORM o
HTML o FILE 'templates/title_test.tpl' PARAMS 'Test MsgError()'
INIT FORM o
ROWGROUP o
SAY VALUE "MsgError( cMsg )" GRID 6 ALIGN 'right' OF o
BUTTON LABEL 'Test' GRID 4 ACTION "MsgError( 'Data not found !' )" OF o
ENDROW o
ROWGROUP o
SAY VALUE "MsgError( cMsg, cTitle )" GRID 6 ALIGN 'right' OF o
BUTTON LABEL 'Test' GRID 4 ACTION "Test2()" OF o
ENDROW o
ROWGROUP o
SAY VALUE "MsgError( cMsg, cTitle, Icon )" GRID 6 ALIGN 'right' OF o
BUTTON LABEL 'Test' GRID 4 ACTION "Test3()" OF o
ENDROW o
ROWGROUP o
SAY VALUE "MsgError( cMsg, cTitle, Icon, cFunc )" GRID 6 ALIGN 'right' OF o
BUTTON LABEL 'Test' GRID 4 ACTION "Test4()" OF o
ENDROW o
HTML o
<script>
function Test2() {
MsgError( 'Data not found !', 'Error' )
}
function Test3() {
MsgError( 'Data not found !', 'Error', '<i class="fas fa-bomb"></i>' )
}
function Test4() {
MsgError( 'Data not found !', 'Error', '<i class="fas fa-bomb"></i>', MyFunc )
}
function MyFunc() {
alert( 'Execute function MyFunc()' )
}
</script>
ENDTEXT
END FORM o
retu nil