Re: Including javascript code
Tom Ekberg <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.roundup.user |
|---|---|
| Message-ID | <CO3PR08MB795779F88F5BCF2F0988F0D6CAEA9@CO3PR08MB7957.namprd08.prod.outlook.com> |
I figured out a way that works. I put this in the <head> section of html/page.html. <script src="@@file/foo.js" type="text/javascript"></script> This loaded the foo.js in html/foo.js. I found the following text in https://roundup.sourceforge.io/docs/customizing.html The following prefix is used to access static resources: 4. /@@file/ It may help to mention javascript and css as examples of static resources. I couldn't find this reference Customizing Roundup until I knew of the @@ file prefix. Kind of a catch 22. Please consider changing these lines to: The following prefix is used to access static resources such as javascript code or css style sheets: 4. /@@file/ When I searched for 'javascript in Customizing Roundup I would have found it. Tom Ekberg Senior Computer Specialist Department of Laboratory Medicine and Pathology 4th Floor, Pat Steel Building, currently WFH Home: (253) 561-2509 Email: [email protected]<mailto:[email protected]> From: Tom Ekberg Sent: Monday, April 11, 2022 1:15 PM To: Roundup Users ([email protected]) <[email protected]> Subject: Including javascript code I have JavaScript code that I put in html/page.html but it is getting a bit large. I put the following in the <head> section of html/page.html <script type="text/javascript" src="foo.js"></script> Foo.js does nothing but an alert. I put the foo.js file in the top level (same level as schema.py) and in html/. All I get is a HTTP 404 error. What is the recommended place to put javascript files and what is the script src attribute to load it into page.html? Tom Ekberg Senior Computer Specialist Department of Laboratory Medicine and Pathology 4th Floor, Pat Steel Building, currently WFH Home: (253) 561-2509 Email: [email protected]<mailto:[email protected]> _______________________________________________ Roundup-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/roundup-users