diff options
author | romangraef <roman.graef@gmail.com> | 2018-06-01 11:07:02 +0200 |
---|---|---|
committer | romangraef <roman.graef@gmail.com> | 2018-06-01 11:07:23 +0200 |
commit | a4717724853ce92888c8aa6c082a25428e00720b (patch) | |
tree | 3697459def6ec3e330bac2b5321908bd372c2daa /static/edit.js | |
parent | 22480d21a0d647d7f1d86a5efb25368225fcb7dd (diff) | |
download | my-website-a4717724853ce92888c8aa6c082a25428e00720b.tar.gz my-website-a4717724853ce92888c8aa6c082a25428e00720b.tar.bz2 my-website-a4717724853ce92888c8aa6c082a25428e00720b.zip |
added editing abilities
Diffstat (limited to 'static/edit.js')
-rw-r--r-- | static/edit.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/static/edit.js b/static/edit.js new file mode 100644 index 0000000..7bdc575 --- /dev/null +++ b/static/edit.js @@ -0,0 +1,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) + }) +}
\ No newline at end of file |