title: How to access an HTML template argument passed from controller in a Javascript function
body: <p>My app is using the play framework mvc setup. In the controller I am passing a parameter while rendering the template, like this:</p>
  
  <pre><code>public static void scenario(){
       ...
       render(active_brands);  
  }
  </code></pre>
  
  <p>Now in my HTML page "scenario.html", I can access the parameter using the play framework tags like this:</p>
  
  <pre><code>#{list items:active_brands, as:'c'}
  ...
  #{\list}
  </code></pre>
  
  <p>Or using JQuery inside an HTML table like this:</p>
  
  <pre><code>&lt;td&gt;${active_brands.get(1)}&lt;/td&gt;
  </code></pre>
  
  <p>Just for reference, the passed in parameter is a List.</p>
  
  <p>However, I am trying to access the parameter "active_brands" from a javascript function and I am not sure how to do that.
  I thought using Jquery to access the variable would work and I tried to access the variable like this:</p>
  
  <pre><code>function update_brands(active_scenario_ids){
      ...
      alert('Reached: '+ ${active_brands});
  }
  </code></pre>
  
  <p>but that does not work. It seems to me that the HTML attribute is out of scope for the javascript function. Is that true?
  It would be great if someone can help me with this. Thanks.</p>