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

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. 

1 answer

0 votes
Zoriana Bogutska_Adaptavist_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
Sep 29, 2022

Hi @Maike 

If you are interested in ready to use solution, you can try apps from Atlassian marketplace. 

For example, Content Formatting Macros for Confluence allows you to add button or search box macros to your confluence pages.

If you are interested and have questions - let me know, this app was developed by my team.

Hi @Zoriana Bogutska_Adaptavist_ 

while yes that's sounds great, I needed to iterate over data that was not in Confluence. 

But thanks.

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events