title: access jquery/javascript variable in velocity template
body: <p>I'm trying to get velocity and a script to pass in and return a variable.</p>
  
  <pre><code>#set ( $test = "" ) 
  ...
  &lt;script&gt;
      var someVariable = '';
      [some stuff happens and someVariable gets set]
      #set ( $test = someVariable )
  &lt;/script&gt;
  ...
  $test
  </code></pre>
  
  <p>And the above '$test' would print out the whatever someVariable was set as. </p>
  
  <p>How can I export a variable from inside a script tag and give it back to velocity template to work with?</p>
  
  <p>For more context, I've been trying to create a dropdown macro in confluence by following <a href="https://answers.atlassian.com/questions/13416749/creating-a-dropdown-user-macro" rel="nofollow">this</a>. I want to be able to use the saved drop down item and use that to modify some other macro I have.</p>