How to Add conformation box "Are you sure you want to delete this record?" before delete record from database in your software.
1 Add java script in your application
<script type="text/javascript">
    function clicked() {
       if (confirm('Do you want to submit?')) {
           yourformelement.submit();
       } else {
           return false;
       }
    }
</script>
Then Add code in your button like below
<input type="submit" onclick="return confirm('Are you sure You want to delete this user?')"   name="deleteuser" style="background-color:red;color:white; id="deleteuser" value="Delete" placeholder="Movie Name" required="">
Thanks Sir for share this information with all It Software Developers.
ReplyDeleteYour knowledge and your software coding skills really amazing and helpful for us. Thanks sir.