Passing gstring to javascript function in Grails
<p>I am passing a gstring as a parameter to a javascript function as shown:</p>

<pre><code>&lt;div class="btn btn-small" id="helpful" onClick="helpful(${value})"&gt;Helpful&lt;/div&gt;
</code></pre>

<p>Here, value comes from controller which is dynamic. I have javascript function as:</p>

<pre><code>function helpful(answer){
        $.post("${createLink(controller: "reviews", action: "dataFromReviews")}",
                {
                    helpful:true,
                    answer:answer
                }
        );
    }
</code></pre>

<p>But I am not getting any response. No error while inspecting. Can't we pass gstring in javascript? Please help.</p>