-
Notifications
You must be signed in to change notification settings - Fork 9
/
combo-hash.prg
53 lines (34 loc) · 862 Bytes
/
combo-hash.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
// {% LoadHrb( 'lib/tweb/tweb.hrb' ) %}
#include {% TWebInclude() %}
function main()
LOCAL o, oWeb
LOCAL hKeyValue := {=>}
hKeyValue[ 'V' ] := 'Volvo'
hKeyValue[ 'R' ] := 'Renault'
hKeyValue[ 'M' ] := 'Mercedes'
DEFINE WEB oWeb TITLE 'Combobox' INIT
DEFINE FORM o
o:lDessign := .F.
o:cSizing := '' // SM/LG
HTML o
<div class="alert alert-dark form_title" role="alert">
<h5 style="margin:0px;">
<i class="far fa-share-square"></i>
Test Combobox
</h5>
</div>
ENDTEXT
INIT FORM o
ROWGROUP o
SEPARATOR o LABEL 'Datos de Salida'
SELECT oSelect ID 'cars' KEYVALUE hKeyValue GRID 6 ONCHANGE 'Select()' OF o
ENDROW o
HTML o
<script>
function Select() {
alert( $('#cars').val() )
}
</script>
ENDTEXT
END FORM o
retu nil