title: How do you pass a JavaScript variable to your Groovy controller?
body: <p>I have been searching on Google for a really good while, and I cannot find a solution to this problem. I am trying to access a JavaScript variable from my GSP file in my Groovy controller, but I can't find out how to do this.</p>
  
  <p>Example:</p>
  
  <pre><code>//JavaScript stuff
  &lt;script&gt;
      function validateForm(){
           var ret = false
      }
  &lt;/script&gt;
  
  //Groovy controller stuff
  def myAction = {
      println params.ret
  }
  </code></pre>
  
  <p>How do I achieve something similar to this?</p>