Changing javascript confirm dialog box to bootstrap

Posted by Scape Goat on Stack Overflow See other posts from Stack Overflow or by Scape Goat
Published on 2014-08-24T03:55:05Z Indexed on 2014/08/24 4:20 UTC
Read the original article Hit count: 129

Filed under:
|
|
|
|

I already this something

Here is the original code:

<script type='text/javascript'>
function delete_user( id ){

    var answer = confirm('Are you sure?');

    //if user clicked ok
    if ( answer ){
        //redirect to url with action as delete and id to the record to be deleted
        window.location = 'delete.php?id=' + id;
    }
}
</script>

How do I remove the old javascript confirm dialog box and replace it with bootstrap?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about php