Browse Source

Fixing #224 - twister in subdir

master
Julian Steinwachs 10 years ago
parent
commit
11bef01ac4
  1. 2
      js/twister_io.js

2
js/twister_io.js

@ -10,7 +10,7 @@
function twisterRpc(method, params, resultFunc, resultArg, errorFunc, errorArg) { function twisterRpc(method, params, resultFunc, resultArg, errorFunc, errorArg) {
// removing hardcoded username from javascript: please use url http://user:pwd@localhost:28332 instead // removing hardcoded username from javascript: please use url http://user:pwd@localhost:28332 instead
//var foo = new $.JsonRpcClient({ ajaxUrl: '/', username: 'user', password: 'pwd'}); //var foo = new $.JsonRpcClient({ ajaxUrl: '/', username: 'user', password: 'pwd'});
var foo = new $.JsonRpcClient({ ajaxUrl: '/' }); var foo = new $.JsonRpcClient({ ajaxUrl: window.location.pathname.replace(/[^\/]*$/, '') });
foo.call(method, params, foo.call(method, params,
function(ret) { resultFunc(resultArg, ret); }, function(ret) { resultFunc(resultArg, ret); },
function(ret) { if(ret != null) errorFunc(errorArg, ret); } function(ret) { if(ret != null) errorFunc(errorArg, ret); }

Loading…
Cancel
Save