1 function deletion_confirm(id) { 2 // Ask user about intentions 3 var status = confirm("Are you sure you want to delete this note?"); 4 5 // If user confirms, submit the given form (delete item) 6 if (status) { 7 document.getElementById(id).submit(); 8 } 9 }