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="">

Comments

  1. Thanks Sir for share this information with all It Software Developers.
    Your knowledge and your software coding skills really amazing and helpful for us. Thanks sir.

    ReplyDelete

Post a Comment

Popular posts from this blog

How to filter data from database according to client name & date wise in PHP

Captcha Code In PHP