-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfooter.jsp
37 lines (24 loc) · 932 Bytes
/
footer.jsp
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
<!-- create a form to change the language based on changing the drop down selection -->
<div class="onside">
<form action="FrontController" method="post">
<!-- When the value of the drop down changes,
submit the form and send the value to the controller -->
<select name ="language" onchange="this.form.submit()">
<%
String language = (String) session.getAttribute("language");
if (language == null || language.equals("en")) {
%>
<option value="en" selected>English</option>
<option value="fr">Irish</option>
<% } else
if (language.equals("fr")) {
%>
<option value="en">English</option>
<option value="fr" selected>Irish</option>
<%
}
%>
</select>
<input type="hidden" name="action" value="changeLanguage"/>
</div>
</form>