-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwscall.html
More file actions
50 lines (37 loc) · 1.18 KB
/
Copy pathwscall.html
File metadata and controls
50 lines (37 loc) · 1.18 KB
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
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<script type="text/javascript" src="https://s1sites01.blob.core.windows.net/lib/webcomponents/xcon.js"></script>
<script type="text/javascript">
/*****************************XCon***********************************/
function theCallBackFunc(scope, eventName) {
wsCall();
//if ((eventName=='LOCATE') || (eventName=='POST') || (eventName=='INSERT'))
}
function setup() {
XCon.setOnDataChange(this, theCallBackFunc);
wsCall()
}
function wsCall(){
var scope = this;
var data = {},
rawData = JSON.stringify(data),
url = '/s1services/js/gbd.wscall/wscall';
XCon.WSCALL(scope, url,rawData,function(sc, res){
var responseFromServer = JSON.parse(res);
if(responseFromServer.data){
document.getElementById('result').innerHTML = responseFromServer["data"]["data"]["NAME"];
}
else{
document.getElementById('result').innerHTML = responseFromServer["NAME"];
}
})
}
</script>
</head>
<body onload="setup();">
<div id="result">
</div>
</body>
</html>