Confirm Message Pop up in SharePoint Forms

Create a Pop up before Submitting a form using jQuery


<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script type="text/javascript">

$(document).ready(function () {
 $("#btn").click(function () {         
                var bool = true;
                msg = "Are you sure want to Submit this Form?";
                bool = confirm(msg);
                if (bool == true) {
                    alert("PR Canceled successfully");
                }           
         
                else {
                    return false;                     
                   }
                return bool;
            });
 });
</script>

<input type="button" id="btn" value="submit" />

Comments

Popular posts from this blog

How to Customize exported excel's cell background color in Datatables

Clear DataTable on button click

Upload multiple attachments to SharePoint List Item using REST API jQuery, along with People Picker Column