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

User macro with button onclick not found


I have a quite complex user macro for a custom user search. I tested it with some hard coded JSON but now working with my api some parts wont work.

F.e. i need a button to run the search but my consol tells me:

Screenshot 2022-09-22 161931.png

it is there and i have no problems on my localhost.

<div class="div_searchbutton">
                    <button type="button" onClick="smalSearch()" class="button_search"><div id="SearchButtonText">Search&#x1F50E</div></button>
        async function smalSearch(){
            var smalSearchBar = document.getElementById("smalSearchBar");
            var searchvalue = smalSearchBar.value;
            if(searchvalue != null && searchvalue != ''){
                smalSearchBool = true;
                var smalSearch = "freetext="+ searchvalue;
                smalSearch =smalSearch.replace(/#/g,"");
                var table = document.getElementById("table_searchresultAddress")
                if(table.children.length <2){
                    const xy = await fetch(apiLinkBase+ 'Person/GetAdresses/?'+ smalSearch);
                    var myjson = await xy.json();
                    personJSON = myjson;
                     var tablePC =document.getElementById("table_searchresultPresence");
                alert("Please enter query. \nBitte Suche eingeben.")

Another problem is that my css is overwritten by some confluence rules but thats not the big problem. 

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence

Watch 4 Confluence apps compete for Best App Demo in September's Appy Hours

Calling all collaborators! Appy Hours on the Atlassian Community is a monthly event where 4 Partner and app vendor presenters go head-to-head with 5-minute demos for the title of Best App Demo. I...

560 views 0 12
Read article

Atlassian Community Events