(SOLVED) fphttpserver and External JavaScript files lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- xinyiman · 2016-12-14 14:54 hello guys, how can I include in a project fpweb of JavaScript libraries? I would use the DHTMLX framework. To be clear in my response I go to insert this piece of code. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i                                       How do I make sure that my standalone server files such recoveries (placed in the folder where is the executable? Thanks ---------------------------------------------------------------------- xinyiman · 2016-12-15 07:34 No idea to solve? I wonder others who use this component as insert external resources! ---------------------------------------------------------------------- xinyiman · 2016-12-16 07:45 I created a working example. CHe if completed and launched, when the page loads localhost: 8080 The code that does this is: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i       myhtml:='';     myhtml:=myhtml + ' Test web ';     myhtml:=myhtml + 'Test web';     myhtml:=myhtml + '';     launches an alert that says Hello World. Now I wish they would change the code so Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i       myhtml:='';     myhtml:=myhtml + ' Test web ';     [b]myhtml:='';[/b]     myhtml:=myhtml + 'Test web';     myhtml:=myhtml + '';     Where MyFunction (); It is contained in the Javascript file. Who tells me how to do? I attach as upfront with the javascript file already created ---------------------------------------------------------------------- derek.john.evans · 2016-12-16 10:04 If you are using TFPHTTPServer, then there is an example in: \lazarus\fpc\3.0.0\source\packages\fcl-web\examples\httpserver You want to map a HTTP request to a local file, which is then served. ---------------------------------------------------------------------- xinyiman · 2016-12-16 13:43 Thank you ---------------------------------------------------------------------- xinyiman · 2016-12-17 08:11 Hello guys, I created a stand-alone server for testing with DHTMLX. Qui.Compilatelo can download it, run it, open the browser and type localhost: 8080 And you will see that the program brings in the content of flie index.html, but not js libraries including the offending file. How to solve? Link: www.lazaruspascal.it/esempi/LazDHTMLX.zip is a TFPWebModule project ---------------------------------------------------------------------- tatamata · 2019-03-18 12:48 How to install dhtmlx? I downloaded the package from https://github.com/cutec-chris/dhtmlx- for-pas2js When I try to compile, I get error: dhtmlx_laz.pas(10,5) Error: can't find unit "System"