-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
72 lines (68 loc) · 2.47 KB
/
test.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<title>Home</title>
</head>
<body>
<form action="" method="post">
<input type="file" id="fileUpload" name="fileUpload">
<select name="Type" id="Type">
<option value="JRS-353">JRS-353</option>
<option value="Jackson">Jackson</option>
<option value="Gson">Gson</option>
<option value="JavaEE8Enhancement">Java EE 8 Enhancement</option>
</select>
<input type="submit" value="Submit">
</form>
<a href="http://localhost:8080/Exercise/soa/">Click here</a>
<script>
// function checkType() {
// var formData = new FormData();
// var value = document.getElementById("Type").value;
// attachment_data = $("#fileUpload")[0].files[0];
// formData.append("attachment_data", attachment_data);
// console.log(formData)
// if (value == "JRS-353") {
// $.ajax({
// type: "Post",
// url: "/123",
// data: formData,
// dataType: "json",
// processData: false,
// contentType: "application/json"
// })
// } else if (value == "Jackson") {
// $.ajax({
// type: "Post",
// url: "/456",
// data: formData,
// dataType: "json",
// processData: false,
// contentType: "application/json"
// })
// } else if (value == "Gson") {
// $.ajax({
// type: "Post",
// url: "/789",
// data: formData,
// dataType: "json",
// processData: false,
// contentType: "application/json"
// })
// } else {
// $.ajax({
// type: "Post",
// url: "/1011",
// data: formData,
// dataType: "json",
// processData: false,
// contentType: "application/json"
// })
// }
// }
</script>
</body>
</html>