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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Adding java script to a wen item

Hi I'm working on a web item using script fragments. I know that we need to add JavaScript code for the button to perform some functionalities. I would like to know how to add the JavaScript to the rest end point. any sample code would be helpful




1 answer

0 votes

REST end points do not have any use for javascript, as they are not intended to be used as a UI in a browser.

What are you actually trying to achieve here?

Hi, I was comming through the web item examples from adaptavist docs. In the advanced dialog section they have mentioned that we need to use javascript if we need complex wiring with the buttons we create. I would like to know how

(function ($) {
$(function () {
AJS.dialog2.on("show", function (e) {
var targetId =;
if (targetId == "my-own-dialog") {
var someDialog = AJS.dialog2(;
$("#dialog-close-button").click(function (e) {
// etc


where should I add this code to?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Marketplace Apps & Integrations

🤺 Atlympic Event: Partnerships

Hello Community!  Quick disclaimer: We are running a contest on Community (The Atlympics!) from July 23rd - August 8th of 2021. If you are interested in participating in this contest (prizes! ...

137 views 2 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you