summaryrefslogtreecommitdiff
path: root/static/edit.js
blob: 7bdc575d82562f0e4458a3988f3436d8cbc44262 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
function save_changes() {
    let summary = $("#summary").val();
    let description = $("#description").text();
    let link = $("#link").val();
    let name = $("#name").val();
    $.ajax({
        url: '.',
        type: 'POST',
        data: {
            summary, description, link, name
        },
    }).done(function () {
        let el = document.createElement("p");
        el.className = "popup";
        el.appendChild(document.createTextNode('Data saved successfully'));
        document.body.appendChild(el)
    })
}