I have a submit button where I want a confirmation pop-up, doing this works fine:
<g:actionSubmit value="Delete"
action="deleteTpsReport"
onclick="return confirm('ohnoes!');"
But when I want to move the confirmation text into the messages.properties file I try:
<g:actionSubmit value="Delete"
action="deleteTpsReport"
onclick="return confirm('<g:message code="tps.delete.confirmation"/>');"
which doesn’t work, the ');" gets displayed on the page and the javascript is totally ignored.
Is there a way to nest these tags so that I can use message in the event handler of the actionSubmit?
This should work: