I tried your code to guess the position of jsolait (experimental)
and got nothing. It was because I had positioned some script-text
inserted directly into the html-head before the script-tag for jsolait.
That results in src=Null and in an error, leaving the loop.
I extended the code like below and all worked well:
///The location where jsolait is installed.
mod.baseURI="./jsolait";
try{// to guess the location where jsolait is installed
var elems=document.getElementsByTagName('script');
for(var i=0;i<elems.length;i++){
var src=elems[i].getAttribute('src');
if (src==undefined) continue;
var idx=src.indexOf('jsolait.js');
if(idx>0){
mod.baseURI=src.slice(0,idx-1);
break;
}
}
}catch(e){
regards
Johann