-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnotes.js
27 lines (21 loc) · 828 Bytes
/
notes.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
function deleteit(x) {
let p = confirm("Are you sure ?");
if (p) {
document.location.href = "notes2.php?sl=" + x;
}
}
edits = document.getElementsByClassName('edit');
Array.from(edits).forEach((element) => {
element.addEventListener("click", (e) => {
tr = e.target.parentNode.parentNode;
title = tr.getElementsByTagName("td")[0].innerText;
description = tr.getElementsByTagName("td")[1].innerText;
console.log("edit ", title, description);
title_edit_id.value = title;
desc_edit_id.value = description;
snoEdit.value = e.target.id;
console.log(e.target.id);
var myModal = new bootstrap.Modal(document.getElementById('edit_modal_id'))
myModal.toggle()
})
})