Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How to disable a <g:submitToRemote/> button
- <!-- Whatever you have before your g:submitToRemote button-->
- <g:checkBox name="myCheckBox" />
- <g:submitToRemote name="myButton" />
- <!-- Whatever you have after your g:submitToRemote button-->
- <!-- Some jQuery to disable the button at the end of your document-->
- <g:javascript>
- $(document).ready(function() {
- $("#myCheckBox").change(function{
- // myButton is disabled if myCheckBox is checked
- if($("#myCheckBox").prop("checked")){
- $("#myButton").attr("disabled", "disabled");
- }
- else{
- $("#myButton").removeAttr("disabled");
- }
- });
- });
- </g:javascript>
- </body>
- </html>
Add Comment
Please, Sign In to add comment