Script Tag w/ Relative Location in Custom Panel?

I’m toying around with building a custom panel for the AI integration I’m working on (I ended up going the “use the AI to offer suggestions” route from my prior post, for now…) and find myself needing to link a few JS files that I’ve also added to the panels directory. My custom panel shows up, but the JS file I link 404s (which I figured it would, but wanted to try before asking how best to do it, just in case)

How should I be linking local Javascript files in custom panels?

Create a “www” folder within you config folder if you don’t already have one. From your custom panel use the relative path “…/local/javascript.js”. That’s how I include resources from panels :slight_smile:

~Cheers

1 Like

You rock, thanks for the quick reply. I’ll try that!

1 Like

Quick update for those who might be searching for this same fix. It worked! I did have to remove the … from the path - it ended up working with “/local/javascript.js” - Huge thank you to PhyberApex for the help!

1 Like