ajnin
ajnin
SSolara
Created by ajnin on 6/3/2024 in #questions-issues
loading static JS file
this was very basic, I'm new to frontend dev, thanks for the help!
22 replies
SSolara
Created by ajnin on 6/3/2024 in #questions-issues
loading static JS file
@mariobuikhuizen could you please guide me here?
22 replies
SSolara
Created by ajnin on 6/3/2024 in #questions-issues
loading static JS file
No description
22 replies
SSolara
Created by ajnin on 6/3/2024 in #questions-issues
loading static JS file
ok thanks, will check
22 replies
SSolara
Created by ajnin on 6/3/2024 in #questions-issues
loading static JS file
gentle reminder
22 replies
SSolara
Created by ajnin on 6/3/2024 in #questions-issues
loading static JS file
okay, I was able to include dhtmlxgantt.js using solara.HTML(tag="script", attributes=("src": "/static/assets/dhtmlxgantt.js", "onload": "initializeGantt()"}) However, inside the function initializeGantt its not able to access gantt (though it loaded the js and I could view it inside the sources tab in static folder while debugging in browser) I'm getting ReferenceError: gantt is not defined. could u please guide me here?
22 replies
SSolara
Created by ajnin on 6/3/2024 in #questions-issues
loading static JS file
This won't meet the success criteria for choosing a framework that uses Python for both UI and backend development. How can I achieve this using only Python ? (as Solara is - A pure Python, React-style web framework)
22 replies
SSolara
Created by ajnin on 6/3/2024 in #questions-issues
loading static JS file
also in the network tab (F12) console I can see 404 for :8765/static/base/js/utils.js:1 :8765/static/base/js/namespace.js:1
22 replies
SSolara
Created by ajnin on 7/9/2024 in #questions-issues
**Issue with Loading Static JavaScript and CSS Files Using `<script>` Tags in Solara**
also in the network tab (F12) console I can see 404 for :8765/static/base/js/utils.js:1 :8765/static/base/js/namespace.js:1
2 replies
SSolara
Created by ajnin on 6/3/2024 in #questions-issues
loading static JS file
Hello, I followed the docs - https://solara.dev/documentation/advanced/reference/static-files https://solara.dev/documentation/advanced/reference/asset-files The issue I am encountering with fetching static files inside a <script> tag in a Solara component. Here’s the scenario: I am using the solara.HTML component to include HTML content within my Solara application: solara.HTML(tag="div", my_html) In the my_html variable, I have included a script tag to load a JavaScript file: <script src="/static/assets/dhtmlxgantt.js"></script> The problem is that the JavaScript file (or any CSS file (I did this just to verify)) specified in the <script> tag does not get loaded. However, when I provide these paths using a <link> tag for CSS or JS, the files are available and load correctly. Could you please assist with how to properly serve and access static JavaScript files within Solara when using the <script> tag? Thank you!
22 replies
SSolara
Created by ajnin on 6/3/2024 in #questions-issues
loading static JS file
I had tried this already, but failed (here no files were available, neither jpeg); ended up mounting the static files
22 replies