diff --git a/js/main.js b/js/main.js index 0c8f0e5..bba2a05 100644 --- a/js/main.js +++ b/js/main.js @@ -1 +1,16 @@ -const database = firebase.firestore(); +const form = document.getElementById('questionform'); +const submit = document.getElementById('questionsubmit'); + + +function addQuestion() { + const input = document.getElementById('questiontext'); + const ul = document.getElementById('questionul'); + + var node = document.createElement("li"); + var textnode = document.createTextNode(input.value); + + node.appendChild(textnode); + ul.appendChild(node); +} + +submit.addEventListener('click', addQuestion()); \ No newline at end of file diff --git a/questioncreate.html b/questioncreate.html index 16614b5..3eb8726 100644 --- a/questioncreate.html +++ b/questioncreate.html @@ -36,32 +36,13 @@
Question Text:
-
- - - - - - - - + + + diff --git a/questionlist.html b/questionlist.html index 45d001d..16bda59 100644 --- a/questionlist.html +++ b/questionlist.html @@ -28,10 +28,10 @@
Question ListAdd Question
-