Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
I have improved Matthew's code to handle Joget v5 use of blockUI.
$(document).ready(function() { //cancel default click event in 1 second setTimeout(function(){ //uncomment this while loop if fails to remove default click event //while( $("#section-actions button, #section-actions input").data("events") ){ $("#section-actions button, #section-actions input").off("click"); //} $("#assignmentComplete,#submit").on("click", function(event) { if (confirm("Are you sure to send email ?")) { $.blockUI({ css: { border: 'none', padding: '15px', backgroundColor: '#000', '-webkit-border-radius': '10px', '-moz-border-radius': '10px', opacity: .3, color: '#fff' }, message : "<h1>Please wait...</h1>" }); return true; } else { return false; } }); }, 1000); });
Where can we insert this code in the form?
Oh, Thank You Very Much
Hi Sa Varee
There is two possible submit id "#assignmentComplete or #submit", just add a "#submit" to your jquery as follows:
<script type="text/javascript"> $(document).ready(function() { $("#assignmentComplete,#submit").on("click", function() { if (confirm("Are you sure to send email ?")) { return true; } else { return false; } }); }); </script>
This is my code ,
And this is , On submit form
And this is , On click cancel
Why, I don't see 'Please wait...'
Please Help Me!!!