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

Customizing SharePoint list and implementing Quick search using jQuery

Enable and Disable Client side People Picker using jQuery

How to generate PDF using jsPDF and html2canvas library