Have you tried the before parameter? It executes a JavaScript function that will be executed before the remote function is called. Just use it like this:
<g:submitToRemote value="Reject" update="feedback" controller="test" action="reject" before="if (!confirm('sure?')) {return false;}" />
No matter which JavaScript you put in the before parameter, it will be inserted into the onclick attribute right before the Ajax update call. Thus, you can easily perform validation, receive confirmations, etc. And even give up onclick processing before sending an Ajax call. There is a similar after parameter.
source share