-
Notifications
You must be signed in to change notification settings - Fork 9
/
brwsearch.prg
51 lines (28 loc) · 845 Bytes
/
brwsearch.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
// {% LoadHrb( 'lib/tweb/tweb.hrb' ) %}
#include {% TWebInclude() %}
function main()
LOCAL o, oWeb
DEFINE WEB oWeb TITLE 'Browse Search' TABLES INIT
DEFINE FORM o
INIT FORM o
HTML o INLINE '<h3>Test TWebBrwSearch()</h3><hr>'
ROWGROUP o
BUTTON LABEL 'Test TWebBrwSearch()' GRID 6 ACTION 'Test()' OF o
ENDROW o
HTML o
<script>
function Test() {
var cUrl = 'srv_brwsearch.prg'
var aHeader = { 'first':'First' , 'last':'Last', 'age': 'Edad...' }
TWebBrwSearch( cUrl, aHeader, myfunc, "NY" )
}
function myfunc( row ) {
console.log( row )
if ( row ) {
MsgInfo( row.first + '<br>' + row.last )
}
}
</script>
ENDTEXT
END FORM o
retu nil