Hello Doitsu, it was last year - but I came back to your idea with the database now.
Or if someone else is able to help here ...
I created a large database with 2000 entries ... the size is 800 kb, but the performance
seems not to be the problem ...
I'm using Calibre to develop my dictionary ..
While editing the epub with Calibre, all went fine ... the database query works!
But if I choose "View" in Calibre, it doesn't work anymore ...
I use two html's ... the first for the input, the second as display. The problem must be
my submit function on the first page:
Code:
function submit()
{
var params = new URLSearchParams();
console.log("submit");
params.append("DATA", "res"); //document.getElementById("myInput").value);
window.location="./display.html"; //?"+params.toString();
}
Apparently, the "window.location" is the problem here ... in the "View" of calibre, I see
Code:
{"version":1,"tree":{"n":"html","c":[{"n":"head","x":"\n ","l":"\n","c":[{"n":"title","x":"word click test","l":"\n "},{"n":"script","l":"\n ","a":[["src","META-INF/jquery-1.11.3.min.js"],["type","text/javascript"]]},{"n":"script","l":"\n ","a":[["src","META-INF/wiktionary-parser.js"]]},{"n":"script","l":"\n ","a":[["src","META-INF/sql.js"],["type","text/javascript"]]},{"n":"script","l":"\n ","a":[["src","META-INF/script.js"],["type","text/javascript"]]},{"n":"script","x":"\n\n\n function init() {\n console.log(\"Init ...\");\n var params = new URLSearchParams(window.location.search);\n\n first = \"res\";//params.get(\"DATA\");\n document.getElementById(\"searchterm\").innerHTML = first;\n console.log(first);\n var outputdef = $(\"#def_pons\");\n getPonsDBInfo(first, function (data) {\n outputdef.html(\"","l":"\n ","c":[{"n":"b","x":"publicus","l":"\tStaatssklave, Unterbeamter, Polizist"},{"n":"br","l":"\");\n let s = data.toString();\n console.log(\"BD = \"+s);\n //s = data.join();//data.forEach(element => s += element);\n\n console.log(\"BD = \"+s);\n\n // outputdef[0].innerHTML=data;\n\n console.log(\"BD = \"+data.length);\n outputdef.html(data);\n // document.getElementById(\"#def_pons\").value=data[0];\n });\n }\n "}]},{"n":"br","l":"\n"}]},{"n":"body","x":"\n ","l":"\n\n","a":[["class","card"],["onload","init()"]],"c":[{"n":"a","l":"\n ","a":[["href","javascript:void(0)"],["data-ENfGg6KL7U9zSnuyGrNEu7","{\"name\": \"main.html\", \"frag\": \"\"}"]],"c":[{"n":"img","a":[["src","back.png"],["height","40px"],["width","40px"],["data-calibre-src","back.png"]]}]},{"n":"br","l":"\n\n "},{"n":"div","x":"\n ","l":"\n","a":[["id","lucere"]],"c":[{"n":"div","x":"\n ","l":"\n ","a":[["class","chapterbar"]],"c":[{"n":"span","l":"\n ","a":[["id","searchterm"]]}]},{"n":"div","x":"\n \n \n Defintionen\n ","l":"\n ","a":[["class","imagebar"]]},{"n":"div","x":"\n ","l":"\n\n ","a":[["class","section"]],"c":[{"n":"div","x":"\n ","l":"\n ","a":[["class","items"]],"c":[{"n":"div","x":"\n ","l":"\n ","a":[["class","tab_content"],["id","dict_tab_101"],["style","display:block"]],"c":[{"n":"div","x":"\n ","l":"\n ","a":[["class","part_main"]],"c":[{"n":"div","x":"\n ","l":"\n ","a":[["class","collins_content"]],"c":[{"n":"div","x":"\n \n ","l":"\n ","a":[["id","def_pons"],["class","explanation_item"]]}]}]}]}]}]},{"n":"div","x":"\n ","l":"\n ","a":[["class","imagebar"]],"c":[{"n":"img","l":"English\n ","a":[["src","british_flag.jpg"],["class","smallimage"],["data-calibre-src","british_flag.jpg"]]}]},{"n":"div","x":"\n ","l":"\n ","a":[["class","tab_content"],["style","display:block"]],"c":[{"n":"div","x":"\n ","l":"\n ","a":[["class","part_main"]],"c":[{"n":"div","x":"\n ","l":"\n ","a":[["class","collins_content"]],"c":[{"n":"div","x":"\n ","l":"\n ","a":[["class","explanation_item"]],"c":[{"n":"p","x":"\n ","l":"\n ","a":[["id","en"],["class","explanation_box"]]}]}]}]}]}]}]}]},"ns_map":["http://www.w3.org/1999/xhtml"]}
It is the content of my display, but it is shown as some kind of JSON object or so ...
I don't understand why this works in the edit mode but not in the view ...
Any ideas where the problem could be?
Kind regards, Frank