Hello,
I am having problems executing a JavaScript file on a specific page. I have followed the description from here https://confluence.atlassian.com/display/CONFKB/How+to+use+JavaScript+in+Confluence
But when I insert the HTML-Macro with the 'script-tags' and put the JavaScript file to the same location as described in the instruction (on our server it is /opt/confluence/confluence/includes/js/), nothing happens when I load the page. There is no alert or something like that.
When I try to execute the JavaScript inside the script-tags without an external file, it works fine.
All modules in the Confluence-Html-Macro are activated and the WhiteList is disabled and I am using Confluence 5.5.
I hope you can help me.
Kind Regards,
Patrick
Community moderators have prevented the ability to post new answers.
These tags worked for me in the HTML macro, ie no HEAD or HTML tags. No tags in the script either.
<script type="text/javascript" src="http://URL/directory/example.js"></script>
URLs seem to work better than filepaths. Also the HTML macro seemed to work better down the bottom of the page.
Hello Adrian,
thank you for your help.
I am not completely finished with developing the script, but it is now possible to execute a JavaScript-file via the URL.
Thanks a lot.
Kind Regards,
Patrick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No problem Patrick. Can I get an upvote? I'm aiming for the Confluence t-shirt..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Of course. I hope I've done that right. If not, please tell me. It is my first question here ;)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.