I have:
<img onclick="exportToFile('WORD')" src="${resource(dir: 'images', file: 'word.png')}" />
<form id="reportForm" action="/test/report1">
................
</form>
<script>
function exportToFile(type) {
$( "#reportForm" ).submit();
};
</script>
If you give the image it will redirect to / test / report1, but I want you to ask where you want to redirect and 2 buttons appear to redirect to / test / report1 or / test / report2