forked from PriyangaPKini/project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNat.html
More file actions
240 lines (217 loc) · 7.62 KB
/
Nat.html
File metadata and controls
240 lines (217 loc) · 7.62 KB
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
<!DOCTYPE html>
<html>
<head>
<title>National Innitiatives Participation</title>
<link rel="stylesheet" href="stylesheet.css">
<style>
h1 {color:#fff;}
body,html {
height: 100%;
margin: 0;
}
.hero-image {
background-image:url("images/national.jpg");
height: 50%;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
position: relative;
}
.hero-text {
text-align: center;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: white;
}
/*the container must be positioned relative:*/
.custom-select {
position: relative;
font-family: Arial;
}
.custom-select select {
display:none; /*hide original SELECT element:*/
}
.select-selected {
background-color:transparent;
}
/*style the arrow inside the select element:*/
.select-selected:after {
position: absolute;
content: "";
top: 14px;
right: 10px;
width: 0;
height: 0;
border: 6px solid transparent;
border-color: #fff transparent transparent transparent;
}
/*point the arrow upwards when the select box is open (active):*/
.select-selected.select-arrow-active:after {
border-color: transparent transparent #fff transparent;
top: 7px;
}
/*style the items (options), including the selected item:*/
.select-items div,.select-selected {
color:brown;
padding: 8px 16px;
border: 1px solid transparent;
border-color: transparent transparent rgba(0, 0, 0, 0.1) transparent;
cursor: pointer;
user-select: auto;
}
/*style items (options):*/
.select-items {
position: absolute;
background-color:#09F;
top: 100%;
left: 0;
right: 0;
z-index: 99;
}
/*hide the items when the select box is closed:*/
.select-hide {
display: none;
}
.select-items div:hover {
background-color: rgba(0, 0, 0, 0.1);
}
.container{
left:15%;
width:700px;
background-image:url("images/img.jpg");
padding-left: 200px;
background-repeat:no-repeat;
background-size:cover;
text-align:left;
color:brown;
font-family: arial;
font-style: italic;
height: 400px;}
</style>
</head>
<body class="Natpage" >
<div class="hero-image">
<div class="hero-text">
<h1 style="font-size:50px" >National Innitiative Participation</h1>
</div>
</div>
<div class="topnav">
<a class="active" href="index.html">Home</a>
<a href="#profile">Profile</a>
<a href="#logout">Logout</a>
<a href="#about">About</a>
</div>
<div class="container">
<h2>Certificate</h2>
<!--surround the select box with a "custom-select" DIV element. Remember to set the width:-->
<div class="custom-select" style="width:200px;">
<select>
<option value="0">Select :</option>
<option value="1">NCC</option>
<option value="2">NSS</option>
</select>
</div>
<br>
<h4>Do you have an activity duration of atlest 2 years?  Yes <input name="yn" type="radio" >    No <input name="yn" type="radio">
<br><br>
Achievement Level: <select>
<option value="0">Select :</option>
<option value="1">C certificate(os performance)</option>
<option value="2">Best NSS Volunteer Awardee(University Level)</option>
<option value="3">Participation in National Integration Camp</option>
<option value="4">Participation in Pre-Republic Day Parade Camp</option>
<option value="5">Best NSS Awardee(State Level/National Level)</option>
<option value="6">Participation in Republic Day Parade Camp</option>
<option value="7">International Youth Exchange Programme</option>
<option value="7">Others</option>
</select>
<br><br>
Approval Document:<select>
<option value="0">Select :</option>
<option value="1">(a) Certificate </option>
<option value="2">(b) Letter from Authorities</option>
<option value="3">(c) Appreciation recognition letter </option>
<option value="4">(d)Documentary evidence </option>
<option value="5">(e) Legal Proof </option>
<option value="5">(f) Others (specify)</option>
</select>
<br><br>
<form action="/action_page.php">
Upload Document: <input type="file" name="img" multiple><br><br>
<input type="submit">
</form>
</h4>
</div>
<script>
var x, i, j, selElmnt, a, b, c;
/*look for any elements with the class "custom-select":*/
x = document.getElementsByClassName("custom-select");
for (i = 0; i < x.length; i++) {
selElmnt = x[i].getElementsByTagName("select")[0];
/*for each element, create a new DIV that will act as the selected item:*/
a = document.createElement("DIV");
a.setAttribute("class", "select-selected");
a.innerHTML = selElmnt.options[selElmnt.selectedIndex].innerHTML;
x[i].appendChild(a);
/*for each element, create a new DIV that will contain the option list:*/
b = document.createElement("DIV");
b.setAttribute("class", "select-items select-hide");
for (j = 1; j < selElmnt.length; j++) {
/*for each option in the original select element,
create a new DIV that will act as an option item:*/
c = document.createElement("DIV");
c.innerHTML = selElmnt.options[j].innerHTML;
c.addEventListener("click", function(e) {
/*when an item is clicked, update the original select box,
and the selected item:*/
var i, s, h;
s = this.parentNode.parentNode.getElementsByTagName("select")[0];
h = this.parentNode.previousSibling;
for (i = 0; i < s.length; i++) {
if (s.options[i].innerHTML == this.innerHTML) {
s.selectedIndex = i;
h.innerHTML = this.innerHTML;
break;
}
}
h.click();
});
b.appendChild(c);
}
x[i].appendChild(b);
a.addEventListener("click", function(e) {
/*when the select box is clicked, close any other select boxes,
and open/close the current select box:*/
e.stopPropagation();
closeAllSelect(this);
this.nextSibling.classList.toggle("select-hide");
this.classList.toggle("select-arrow-active");
});
}
function closeAllSelect(elmnt) {
/*a function that will close all select boxes in the document,
except the current select box:*/
var x, y, i, arrNo = [];
x = document.getElementsByClassName("select-items");
y = document.getElementsByClassName("select-selected");
for (i = 0; i < y.length; i++) {
if (elmnt == y[i]) {
arrNo.push(i)
} else {
y[i].classList.remove("select-arrow-active");
}
}
for (i = 0; i < x.length; i++) {
if (arrNo.indexOf(i)) {
x[i].classList.add("select-hide");
}
}
}
/*if the user clicks anywhere outside the select box,
then close all select boxes:*/
document.addEventListener("click", closeAllSelect);
</script>
</body>
</html>