-
Notifications
You must be signed in to change notification settings - Fork 0
/
trial.js
102 lines (89 loc) · 2.35 KB
/
trial.js
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
const prov_Districts = {
"Kigali" : ["Choose District",
"Gasabo",
"Kicukiro",
"Nyarugenge"
],
"South" : [
"Choose District",
"Kamonyi",
"Muhanga",
"Ruhango",
"Nyanza",
"Huye",
"Gisagara",
"Nyamagabe",
"Nyaruguru"
],
"West": ["Choose District",
"Rusizi",
"Nyamasheke",
"Rutsiro",
"Karongi",
"Rubavu",
"Nyabihu",
"Ngororero"
],
"East" : [
"Choose District",
"Nyagatare",
"Bugesera",
"Ngoma",
"Kirehe",
"Kayonza",
"Gatsibo",
"Rwamagana"
],
"North": [
"Choose District",
"Rulindo",
"Gakenke",
"Musanze",
"Burera",
"Gicumbi"
],
"drc": ["+243"],
"sudan": ["+249"],
"rwanda": ["+250"],
"kenya": ["+254"],
"tanzania": ["+255"],
"uganda": ["+256"],
"burundi":["+257"]
};
let listDistrict = document.getElementById("select_2");
let listProvince = document.getElementById("select_1");
let listOfCountries = document.getElementById("countries");
let listOfCode = document.getElementById("chooseCode");
let assignDistrict = () => {
listDistrict.innerHTML = "";
let province = listProvince.value;
for (var i = 0 ; i < prov_Districts[province].length; i++){
listDistrict.innerHTML += `<option value="">${prov_Districts[province][i]}</option>`;
}
};
let displayCode = () => {
listOfCode.innerHTML="";
let Country = listOfCountries.value;
for (var j= 0 ; j<prov_Districts[Country].length; j++){
listOfCode.innerHTML += `<option value="">${prov_Districts[Country][j]} </option>`
}
}
let n1 = document.getElementById("n1");
let n2 = document.getElementById("n2");
var validate = () => {
if (n1.value != "" && n1.value != ""){
if (n1.value == n2.value){
return true;
}}
alert("Your Password did not match");
return false;
}
let mail = document.getElementById("mail");
let email = mail.value;
function validate(email){
let n= email.indexOf("@gmail.com");
if (n >=1){
return true;
}
alert("Check on your Gmail");
}