Jump to content

How to read javascript file from delphi unigui


leandro

Recommended Posts

Hello, I have a project with unigui, which has an html template associated with a javaScript file. What I need is to know how to make sure that when running in the browser, it reads that js file, since outside of Delphi it works fine for me, but when using it from Delphi I can't get it to read the file. I am using a TUniSyntaxEdit to read the html. I tried putting the js file in the Files folder and then calling it from the ServerModule in customFiles, but it still doesn't work.

Link to comment
Share on other sites

Make sure the path you're using to reference the JavaScript file in your HTML code is correct relative to your Delphi project's root directory. Also, check your browser's developer console for any error messages that might give you a clue about what's going wrong. It could be a CORS (Cross-Origin Resource Sharing) issue if the JavaScript file is hosted on a different domain. If all else fails, you can try using an absolute URL for the JavaScript file in your HTML code to see if that resolves the problem.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...