Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9171545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:10:39+00:00 2026-06-17T16:10:39+00:00

I am currently using Confluence 4.3 and I’m trying to add either an HTML

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:10:39+00:00Added an answer on June 17, 2026 at 4:10 pm

    There is no special notation for writing Javascript in Velocity. Just write as you normally do in any HTML file. An example would be :

        <form>
        #if ($searchVisible)
            <div id = "searchLinkContainer" >
                <a href="javascript:searchFunction()">Click here</a> to search.
            </div>  
        #end    
        </form>
        <script language="JavaScript" type="text/javascript">   
            function searchFunction () {
                //Do search
            }
        </script>
    

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to write a simple php function that will strip everything between two
I'm currently using inline javascript to clear an input text's default value on focus.
I am currently using Ubuntu 11.10 and java SE 1.6.0_26. I am trying to
heres what I'm currently using: Rails -v 3.2.3 I'm trying to make a path
I am trying to migrate some existing blog entries into our confluence wiki using
Currently using MVC3 and using jQuery $.post function to send the ajax request to
Currently using Oracle/BEA/Plumtree ALUI Portal 6.1, and am trying to display a client's IP
Im currently using jquery to link all td's to the edit link but i
Currently using the JQuery UI autocomplete list function JQuery UI - Autocomplete . I
Im currently using a script (that is working) where I can apply a certain

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.