-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtestFront.html
85 lines (58 loc) · 2.08 KB
/
testFront.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
73
74
75
76
77
78
79
80
81
82
83
84
85
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<script src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
<title>Signup</title>
</head>
<body>
<h1 align="center" style="color:blue;">Signup</h1>
<div class = "border" align="center">
<h2><u>Script executer UI</u></h2><br>
<div class="innerContent" align="center" >
<br>
Name </t> : <input type="text" id = "name" placeholder="enter name "></input></t><br><br>
Email </t> : <input type="text" id = "email" ></input><br><br>
Password </t> : <input type="text" id = "pass" ></input></t><br><br>
Retype Password </t> : <input type="text" id = "repass"></input>
<br><br><br>
<button id = "exeBtn" onclick = "execute()" class = "button" >Signup</button>
<br><br><br>
</div>
<br><br>
<div id = "result">
<h2><u>Query Results : </u></h2>
<div id="resultBox">
<h3 id = "queryResult"></h3>
<h3 id = "selectedDocuments"></h3>
<h3 id = "deleteResult"></h3>
</div>
</div>
</div>
<script type="text/javascript">
function execute(){
queryResult.innerHTML = "";
selectedDocuments.innerHTML = "";
deleteResult.innerHTML = "";
name = document.getElementById("name").value;
email = document.getElementById("email").value;
pass = document.getElementById("pass").value;
repass = document.getElementById("repass").value;
var data = {};
data.name = name;
data.email = email;
data.pass = pass;
$.ajax({
type: 'POST',
data: JSON.stringify(data),
contentType: 'application/json',
url: 'http://localhost:8000/users/signup',
success: function(data) {
console.log('success');
console.log(data)
}
});
}
</script>
</body>
</html>