diff --git a/js/interact.js b/js/interact.js index 2fffba3..4101694 100644 --- a/js/interact.js +++ b/js/interact.js @@ -61,7 +61,22 @@ export function postAnswers(ans) { } } else { alert(`Error submitting answers: ${data.error}`); - } - }); - // $.post( "http://localhost:8000/submit_answers", JSON.stringify(ans)); + var docHeight = $(document).height(); + + $("body").append(`

A copy of your answers are displayed below. Please refresh this page to continue.

${ans}
`); + + $("#overlay") + .height(docHeight) + .css({ + 'opacity' : 0.4, + 'position': 'absolute', + 'top': 0, + 'left': 0, + 'background-color': 'black', + 'width': '100%', + 'z-index': 5000 + }); + } + }); + // $.post( "http://localhost:8000/submit_answers", JSON.stringify(ans)); }