From 95ebb9e3169f3590454e265e9511f3b44cde3a31 Mon Sep 17 00:00:00 2001 From: TanmayAgrawal <42508311+TanmayAgrawal@users.noreply.github.com> Date: Sun, 8 Sep 2019 11:13:43 +0530 Subject: [PATCH 1/2] AJAX for recieving questions and sending answers --- js/ajax-questions.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 js/ajax-questions.js diff --git a/js/ajax-questions.js b/js/ajax-questions.js new file mode 100644 index 0000000..e6c75c7 --- /dev/null +++ b/js/ajax-questions.js @@ -0,0 +1,30 @@ + +var xhttp = new XMLHttpRequest(); +var question; +var team_name; +xhttp.open("GET", "url", true); +xhttp.setRequestHeader("Content-Type", "application/json"); +xhttp.onreadystatechange = function() { + if (this.readyState == 4 && this.status == 200) { + + var json = JSON.parse(this.responseText); + console.log(json); + question = json.question; + team_name = json.team_name; + console.log(question,team_name); + } +}; + +xhttp.send(); + +function sendres() { + var ans = JSON.stringify(document.getElementById("").innerHTML); + var res = new XMLHttpRequest(); + res.open("POST","url",true); + res.setRequestHeader("Content-Type", "application/json"); + res.onreadystatechange = function() { + if (this.readyState == 4 && this.status == 200) { + } + }; + res.send(ans); +} \ No newline at end of file From 0ce34a832adbc33b3ea73d3215aca7eb7d221a49 Mon Sep 17 00:00:00 2001 From: TanmayAgrawal <42508311+TanmayAgrawal@users.noreply.github.com> Date: Sun, 8 Sep 2019 11:15:52 +0530 Subject: [PATCH 2/2] Homepage and google sign-in --- google_sign-in.html | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 google_sign-in.html diff --git a/google_sign-in.html b/google_sign-in.html new file mode 100644 index 0000000..a5564e4 --- /dev/null +++ b/google_sign-in.html @@ -0,0 +1,34 @@ + +
+ + + + + + +