Confirmation dialog on delete

[edit|delete]

Just add this to your layout after the include 'web2py_ajax.html'

<script><!--
$(document).ready(function(){
    $('.delete').attr('onclick','if(this.checked) 
    if(!confirm("Sure you want to delete this object?")) this.checked=false;');
});
//--></script>

Will work on all your forms.



Post a comment