Disappearing output

html-css
javascript

#1

https://repl.it/@mtf/KCF-Equivalencies

Can anybody explain why the input and textarea fields are being cleared? I’m scratching my head, and probably blind to the very reason right under my nose. Call it selection bias, or something like that. I’d greatly appreciate another eye or two looking into the situation. Thanks.


#2

the form is actually submitting, this cause causes the page to refresh, causing the output to vanish.

we need to prevent the form from actually submitting:

button.addEventListener('click', function (event) {
    event.preventDefault();

#3

Thanks, @stetim94. It’s been so long since I did anything with a form element I half expected to run into problems. As expected, right under my nose. D’oh!


#5