Viewing How do I include Javascript files in my website
How do I include Javascript files in my website
|
User: Tom M. 9 years ago
|
|
|
I have some javascript files that I want to include in a "scripts" directory and then use within HTML snippets in some of my web pages. How can I do this? Last edit 9 years ago |
|
|
User: Roddy 9 years ago
|
|
|
Here's some info about code insertion in general and javascript in particular.
------------------------------- Roddy Website: http://everwebwidgets.com Contact: http://everwebwidgets.com/ewWidgets-home/contact.html NOTE: I am an EverWeb user and NOT affiliated with EverWeb! Any opinions expressed in this forum are my own. |
|
|
User: Tom M. 9 years ago
|
|
|
Thank you for the reminder about code insertion, I use that whenever I need to insert javascript into the inline coding of the web page. However, I would like to be able to put a javascript file, say "foo.js", into the Assets list and have it uploaded to the website just like images are. Even better, if javascript files are loaded into a "scripts" directory (or perhaps let me organize the assets myself into directories), just as images are loaded into an "images" directory. This is desirable because some javascript code is quite long and involved and putting it inline in the web page is quite cumbersome. Much better to put it in a file and then reference the file from inline code, as you noted in your http://everwebcodebox.com/code/javascript.html link. While I can put "foo.js" into the "external files" section of the website Assets, it never gets uploaded. Is this the expected behavior? Last edit 9 years ago |
|
|
User: Roddy 9 years ago
|
|
|
Drag foo.js into Assets. Select it and then right click it to copy the relative file path. Insert this into the page or site wide head or footer code box... <script type="text/javascript" src="#"></script> ... and paste the relative file path in to replace the hash sign. NOTE: This forum turns javascript into two words so remove the space if you copy the code from my post. ------------------------------- Roddy Website: http://everwebwidgets.com Contact: http://everwebwidgets.com/ewWidgets-home/contact.html NOTE: I am an EverWeb user and NOT affiliated with EverWeb! Any opinions expressed in this forum are my own. |
|
| Post Reply |
| You must login or signup to post. |
