Hi,
i'm attaching a small example of using pas2js with fpweb (fphttpserver) and use of XMLHttpRequest in my case. maybe someone finds it quite useful. This was made on Win7 Laz2.0.10.
A few comments:
- in project1 of httpserver when it comes to
RegisterFileLocation('project1.js', '/kody\LAZARUS\html\httpServer1');
it is my path, so you have to chane to your path
-ip port 8080, feel free to change it (as everything)
-you must have pas2js and lazweb installed in order to compile and run, otherwise only to see how it's built.
-file project1.js already is in the httpServer1.rar and it is the same as in pas2js_file.rar
- i know. it is not perfect but seems to work
well, at least for me.
Regards,