title: Grails call function without redirect
body: <p>In my gsp page, after clicking on an image, i want to save something to the database but don't want to leave that page / redirect. Is that possible using Grails?</p>
  
  <p>Using this:</p>
  
  <pre><code>&lt;g:link action="addF" params="[prog: it3.id]" onclick="return confirm('${message(code: 'Are you sure you want to add this as favourite ?')}');"&gt;
                                  &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;img src="${resource(dir:"images", file: "f.png") }" width="21" height="18"/&gt;
                                  &lt;/g:link&gt;
  </code></pre>