Ajax and Http server application lazarus lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- xinyiman · 2017-08-13 15:22 Hi guys, a question. How ever when I create a "http server application" program with these simple 3 rows in the OnRequest event 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      AResponse.ContentType := 'text/html;charset=utf-8';     AResponse.Content:='hello world';     Handled := True;  If I launch a url in a browser I see the word 'hello world' correctly, but if I run an ajax call from an html file I can not see the result. In my opinion I mistake something in the parameterization of the lazarus program. Does anyone know why? My javascript code: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   ---------------------------------------------------------------------- Phil · 2017-08-13 15:27 Quote from: xinyiman on August 13, 2017, 05:22:59 pmIf I launch a url in a browser I see the word 'hello world' correctly, but if I run an ajax call from an html file I can not see the result. Check your browser dev tools for error messages. For example, in Firefox open the Browser Console. Maybe you're hitting the browser restrictions on cross-domain calls?