04-01-2023, 04:51 PM
Hello,
I use Bootstrap for my IntraWeb project and there are many css and js files which using in each page (same and differ of each pages).
Now I use AddBodyScriptFile and ContentFiles to add them in my each form. It's work, if build with SA Indy (.exe) but I switch to build with ISAPI (.dll) and test it on IIS. I found AddBodyScriptFile and ContentFiles not working in this case. Below is result
example my css and js link when Run Web App with SA Indy (.exe) --> OK
<link href="/assets/mycss.css" rel="stylesheet" type="text/css"/>
<script src="/assets/myjs.min.js"></script>
but this is example my css and js link when Run Web App with ISAPI (.dll) --> not working
<link href="/myIWProject.dll/assets/mycss.css" rel="stylesheet" type="text/css"/>
<script src="/myIWProject.dll/assets/myjs.min.js"></script>
--------
The Problem : when Run Web App with ISAPI (.dll) in path of both CSS and JS have my dll name together ( this case is --> /myIWProject.dll on the file path).
How to cancel this name/path(/myIWProject.dll) or
Which way I should to add link(css) and script(js) tag for css and js path in my each Delphi form (Each form may not reference the same css or js.)
Thank you.
I use Bootstrap for my IntraWeb project and there are many css and js files which using in each page (same and differ of each pages).
Now I use AddBodyScriptFile and ContentFiles to add them in my each form. It's work, if build with SA Indy (.exe) but I switch to build with ISAPI (.dll) and test it on IIS. I found AddBodyScriptFile and ContentFiles not working in this case. Below is result
example my css and js link when Run Web App with SA Indy (.exe) --> OK
<link href="/assets/mycss.css" rel="stylesheet" type="text/css"/>
<script src="/assets/myjs.min.js"></script>
but this is example my css and js link when Run Web App with ISAPI (.dll) --> not working
<link href="/myIWProject.dll/assets/mycss.css" rel="stylesheet" type="text/css"/>
<script src="/myIWProject.dll/assets/myjs.min.js"></script>
--------
The Problem : when Run Web App with ISAPI (.dll) in path of both CSS and JS have my dll name together ( this case is --> /myIWProject.dll on the file path).
How to cancel this name/path(/myIWProject.dll) or
Which way I should to add link(css) and script(js) tag for css and js path in my each Delphi form (Each form may not reference the same css or js.)
Thank you.