I'm using a g:select (actually, a g:currencySelect) in my view.
I want a controller action to fire as soon as the user changes the value in the resulting select box.
How can I do this?
I think I'm answering my own question here, but do let me know if there's a better way of doing this:
Use the onchange javascript function in the select tag:
<g:form controller="changeCurrency" action="changeCurrency">
<g:select onchange="submit()"/>
</g:form>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With