First welcome to the forum. Second, this sounds like a generic issue and not specific to the NB. Nothing wrong with asking here but compared to sites like
stackoverflow bandwidth here is fairly low.
A couple of suggestions: First get more consistent with your use of “;” in JS, that way you can use JavaScript lint tools to scan your code for errors. Second, I don’t see anything wrong with the code but if you always submit the form with JS, it might help to disable the default form submission, that is add:
Code:
<form onsubmit="return false;">