summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2015-10-30 13:14:37 +0100
committerHarald Eilertsen <haraldei@anduin.net>2015-10-30 13:14:37 +0100
commit4cba7b32275b454767ab2391a1a27ae8b77a0f3c (patch)
tree49061abbc8b282ff66ed63dc4f0c52f34957a6c1
parent0f0caba86f4fdd16db3874715b3587d5c5560d19 (diff)
downloadnorsk-urskog-registrations-4cba7b32275b454767ab2391a1a27ae8b77a0f3c.tar.gz
norsk-urskog-registrations-4cba7b32275b454767ab2391a1a27ae8b77a0f3c.tar.bz2
norsk-urskog-registrations-4cba7b32275b454767ab2391a1a27ae8b77a0f3c.zip
Use base location when creating URL for XMLHttpRequests.
-rw-r--r--public/regform.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/public/regform.js b/public/regform.js
index a74d087..9ead521 100644
--- a/public/regform.js
+++ b/public/regform.js
@@ -19,11 +19,11 @@ window.onload = function() {
add_member_button.onclick = function() {
num_members += 1;
- fetch('member/new/' + num_members, 'form-members');
+ fetch(window.location + 'member/new/' + num_members, 'form-members');
};
add_song_button.onclick = function() {
num_songs += 1;
- fetch('song/new/' + num_songs, 'form-songs');
+ fetch(window.location + 'song/new/' + num_songs, 'form-songs');
};
};