summaryrefslogtreecommitdiff
path: root/static/edit.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/edit.js')
-rw-r--r--static/edit.js18
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