-
Notifications
You must be signed in to change notification settings - Fork 0
/
actionPage.jsp
58 lines (44 loc) · 1.87 KB
/
actionPage.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<html>
<body style="background-image: url('/new_notify1/code_img.jpg');background-repeat: no-repeat;background-size: 100%;background-position: center;">
<div style="margin: 300px 600px;">
<div style="margin: 5% -50%; background-color:#a0065a; width:50%; height:400px; padding:30px;border-radius:30px;">
<s:form action="raiseEvents" method="post" namespace="/">
<s:select label="FEATURES"
headerKey="-1" headerValue="Select feature"
list="feat" id="f_id"
name="feature" onchange="show_details()"/><br>
<s:select label="EVENTS"
headerKey="-1" headerValue="Select events"
list="eve"
name="event" />
<s:textfield label="CONTENT" name="content" placeholder="contents here" /><br>
<s:submit cssClass="button-register" value="Raise_events" name="Raise_events" style="background-color: orange;"/>
<s:submit cssClass="button-register" value="Unsubscribe" name="Unsubscribe" style="background-color: red;"/>
<s:submit cssClass="button-register" value="Resubscribe" name="Resubscribe" style="background-color: yellow;"/>
<!--<input type="Submit" name="Raise_events" value="Raise_events" style="background-color: orange;" />
<input type="Submit" name="Unsubscribe" value="Unsubscribe" style="background-color: red;" />-->
</s:form>
</div>
</div>
</body>
<script src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous"></script>
<script>
function show_details() {
let temp = document.getElementById("f_id");
let postData = {
feature: temp.options[temp.selectedIndex].value
}
console.log(postData);
$.post('/new_notify/action',postData).then(res => {
//console.log(res);
$("body").html(res);
}).catch(err => {
console.log(err);
});
}
</script>
</html>