Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Customer Script in Sidebar

Hello, everyone.


My question would be if using JavaScript scripts on Confluence's Sidebar is supported, is it something meant to work smoothly or something like this?


The questions comes from one of the users using my company's Confluence spaces, he is running a JavaScript script that is retrieving information from somewhere else, but when they try to add more functions (alert, specifically) to the script it won't let them save the changes.


Per the documentation (although it does not say it clearly) apparently JS is not supported on Sidebar and the fact they got it running in the first place seems to be odd (they run it with the {html} tags from the html macro on Confluence).


So, I just would like to have a response regarding it.

Thanks in advance.

2 answers

Hi everyone,


Any ideas what could this be? Thanks

0 votes

Hi @Christian Isaza Aguirre ,

welcome to the Atlassian community!

Javascript is something that works on client side and there is no limitation about where it works. So it should work also on Confluence sidebar side.

Here a guide about how to setup your javascript


@Fabio Racobaldo _Herzum_  


Thank you so much for your response.


I was checking that documentation and this:
Configure the sidebar 


But I cannot find a solution to our issue. It seems there is a code error but we definitely cannot find where it is; myself, I am not a programmer so this is getting kind of difficult to me.

Note: The error they get when trying to save the changes to the code is:

Web Application Firewall - This transfer is blocked by a Web Application Firewall - But this only happens when changing that code specifically, anything else is not reporting such error.

More context:

As mentioned before, our team is already using a script they wrote about 5 years ago, and now they try to ad alerts not working, and this is something the person writing the code has noticed:

"I have started creating a minimal case that triggers the error. What I have found is that the code does not like "if" statements in javascript, not even when they are commented out!

So this works:
alert("hello world");
var a=1;
do { a=0; alert("hello again") } while (a==1)

This does not work:
alert("hello world");
var a=1;
if (a==1) { a=0; alert("hello again") }

and this does not work either:
alert("hello world");
var a=1;
// if (a==1) { a=0; alert("hello again") }

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events