-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.html
162 lines (115 loc) · 4.06 KB
/
index.html
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<!--
PLACES EDUPALU FONGWAMAA v.1.0 by © 2015 TRESOR NGASSAKI SITA(http://www.fongwama.com)
-->
<!DOCTYPE html>
<html lang="en">
<head>
<title>Edupalu Place</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,charset=iso-8859-1">
<meta name="viewport" content="width=device-width, initialscale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="css/bootstrap.min.css" rel="stylesheet">
<script src="js/jquerry-1.12.2.js"></script>
</head>
<body >
<br>
<div class="container">
<div class="col-md-12">
<div class="col-md-6">
<form >
<legend><h1>Recherche des centres de santé</h1></legend>
<div class="form-group">
<label for="lieux">Lieu</label>
<select id="lieux" class="form-control">
<option value="t">Talangai</option>
<option value="p">Poto-Poto</option>
<option value="m">Moungali</option>
</select>
</div>
<div class="form-group">
<button class="btn-block btn btn-primary" onclick="search();">Rechercher</button>
</div>
<div class="form-group">
<label for="txtMotClef">Mot clef</label>
<input id="txtMotClef" type="text" class="form-control">
</div>
<div class="form-group">
<button class="btn-block btn btn-primary" onclick="searchMot();">Rechercher</button>
</div>
<br>
<div class="form-group">
<button class="btn-block btn btn-primary">Le plus proche de ma position</button>
</div>
</form>
</div>
<div class="md-md-2"></div>
<div class="col-md-4-"></div>
<div class="col-md-4">
<div class="panel panel-default hidden" id="resultats">
<div class="panel-heading">
<h3>Résultats</h3>
</div>
<div class="panel-body">
<h4 class="t1"></h4>
<h4 class="t2"></h4>
<h4 class="t3"></h4>
<h4 class="p1"></h4>
<h4 class="p2"></h4>
<h4 class="p3"></h4>
<h4 class="r"></h4>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var datas = new Array();
var centre = new Object();
centre.adresse="15 rue ndolo";
centre.nom="Centre Sida double";
centre.lieu="talangai";
datas[0]=centre;
var centre2 = new Object();
centre2.adresse="25 rue lampama";
centre2.nom="Centre Apollo1";
centre2.lieu="talangai";
datas[1]=centre2;
function search()
{
$('#resultats').show();
var lieu1 = $('#lieux').val();
if(lieu1 == 't')
{
$('.t1').text('15 rue ndolo');
$('.t2').text('25 rue lampama');
$('.t3').text('48 rue liranga');
}
//si le lieu choisis est poto-poto : ajouter du texte dans les balises h4 des différentes
if(lieu1 == 'p')
{
$('.p1').text('avenue de la paix');
$('.p2').text('78 rue djambala');
$('.p3').text('85 rue aoussa');
}
}
/*
cette fonction recherche le mot tapé
*/
function searchMot()
{
var mot = $('#txtMotClef').val();
for(var i = 0; i < datas.length; i++)
{
var item = datas[i];
if(item.nom.contains(mot))
{
console.log(item.lieu +" "+item.nom);
}
}
}
</script>
</body>
</html>