]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
fix absolute paths in cts.js - breaks with redirect in sub-directory
authorJan Michel <j.michel@gsi.de>
Tue, 11 Apr 2017 20:03:55 +0000 (22:03 +0200)
committerJan Michel <j.michel@gsi.de>
Tue, 11 Apr 2017 20:03:55 +0000 (22:03 +0200)
web/htdocs/scripts/cts.js

index 453dd2bc1824524fe17105f60a1c934f7da770c7..b53f54017ae156aeed02176a57a098f511f0feab 100644 (file)
@@ -133,7 +133,7 @@ var CTS = new Class({
    },
    
    readRegisters: function(regs, callback, formated) {
-      var opts = {'onFailure':requestFailure, 'url': '/cts/cts.pl?' + (formated ? "format" : "read") + ',' + Array.from(regs).join(",")};
+      var opts = {'onFailure':requestFailure, 'url': 'cts.pl?' + (formated ? "format" : "read") + ',' + Array.from(regs).join(",")};
       if (callback) {
          opts['onSuccess'] = callback;
          return (new Request.JSON(opts)).send();
@@ -147,7 +147,7 @@ var CTS = new Class({
    writeRegisters: function(values) {
       var arrValues = [];
       Object.each(values, function(v,r) {arrValues.push(r); arrValues.push(v)});
-      var myUrl = '/cts/cts.pl?write,' + encodeURIComponent( arrValues.join(',') );
+      var myUrl = 'cts.pl?write,' + encodeURIComponent( arrValues.join(',') );
       (new Request.JSON({
          url: myUrl,
          onSuccess: function(json, text) {