I am currently using Confluence 4.3 and I’m trying to add either an HTML button or HTML link that will invoke a javascript function.
How can this be achieved?
Specifically, there is a file called “searchpanel.vm” within Confluence which is a simple velocity template that defines criteria used to refine your confluence searches.
I wish to a button in the search panel that will invoke a javascript function. How do I do this?
There is no special notation for writing Javascript in Velocity. Just write as you normally do in any HTML file. An example would be :
Note that if you include the tag inside a conditional statement in Velocity and it doesn’t get traversed, the script will not be available in the HTML page.