Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Simple calculation macro

Jakub Hanak
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 14, 2019

Hello Community,

I am trying to create a simple calculation macro in the Confluence. I have never done it before, this is my first. I found the syntax and everything. Here is what I tried:

## @Param nr1:title=number1|type=int|required=true|
## @Param nr2:title=number2|type=int|required=true|

<script type="text/javascript">
AJS.toInit(function(){
var x = $paramnr1;
var y = $paramnr2;
var result = x * y;
$(result);
});
</script>

Parameters are ok, but the problem is that I am not getting any result. What am I missing here? 

Thank you 

Jakub 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events