-
Notifications
You must be signed in to change notification settings - Fork 0
/
createUser.js
44 lines (41 loc) · 1.23 KB
/
createUser.js
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
// function UserAction() {
// var xhttp = new XMLHttpRequest();
// xhttp.onreadystatechange = function() {
// if (this.readyState == 4 && this.status == 200) {
// alert(this.responseText);
// }
// };
// xhttp.open("POST", "194.94.239.125:9000/publish", true);
// xhttp.setRequestHeader("Content-type", "application/json");
// var text = '{'+
// '"type": "created-user",'+
// '"sender": "pm-user",'+
// '"concernedUsers": ["1"],'+
// '"payload": {'+
// '"userId": "1",'+
// '"username": "khashmi",'+
// '"firstName": "khurram",'+
// '"lastName": "hashmi"'+
// '},'+
// '"tags": ['+
// '"user", "account" '+
// ']'+
// '}';
// xhttp.send(text);
// }
// <button type="submit" onclick="UserAction()">Search</button>
<!DOCTYPE html>
<html>
<head>
<title>JSON with JavaScript Object Creation </title>
<script language="javascript" >
var JSONQury = { "item" : "pen", "manufactured" : 2014 };
document.write("<h1>JSON with JavaScript</h1>");
document.write("<br/>");
document.write("<p>Item Name="+JSONQury.item+"</p>");
document.write("<p>Manufactured in="+JSONQury.manufactured+"</p>");
</script>
</head>
<body>
</body>
</html>