From 0863fd869b6ef23501e5c67249f3be661af80e07 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Fri, 30 Oct 2015 14:33:46 +0100 Subject: Remove ajax code for adding songs/members. --- public/regform.js | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 public/regform.js (limited to 'public') diff --git a/public/regform.js b/public/regform.js deleted file mode 100644 index 197034e..0000000 --- a/public/regform.js +++ /dev/null @@ -1,21 +0,0 @@ -function fetch(url, id) { - var req = new XMLHttpRequest(); - req.onload = function() { - var element = document.getElementById(id); - var node = document.createElement("div"); - node.innerHTML = this.response; - element.appendChild(node); - }; - req.open("GET", url); - req.send(); -} - -window.onload = function() { - var num_songs = 0; - var add_song_button = document.getElementById('add-song-button'); - - add_song_button.onclick = function() { - num_songs += 1; - fetch(window.location + '/song/new/' + num_songs, 'form-songs'); - }; -}; -- cgit v1.2.3