11 ots.otsdaqFeatures_ = {};
13 ots.initFeatures =
function()
15 console.log(
"ots.initFeatures()");
17 ots.HttpRequest(
"../contentData/otsdaq_features.json",
"",
20 console.log(
"Request text",req.responseText);
21 ots.otsdaqFeatures_ = JSON.parse(req.responseText);
22 console.log(
"json features",ots.otsdaqFeatures_);
25 var anchori = window.location.href.indexOf(
'#');
27 location.href = window.location.href.substr(anchori);
32 window.addEventListener(
"load",ots.initFeatures);
44 ots.HttpRequest =
function(requestURL, data, returnHandler, reqIndex) {
47 var req =
new XMLHttpRequest();
49 req.onreadystatechange =
function() {
50 if (req.readyState==4) {
54 console.log(
"Request Response Text " + req.responseText);
60 console.log(
"Request Failed!");
63 if(returnHandler) returnHandler(req,reqIndex,errStr);
69 req.open(
"POST",requestURL,
true);
71 req.setRequestHeader(
"Content-Type",
"text/plain;charset=UTF-8");