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

Populate dropdown using jquery ajax in SharePoint

Customizing SharePoint list and implementing Quick search using jQuery