I was just a creating a program in JavaScript and then this error pops up. I have researched it, but all the cases seem to be different to mine. Any help would be greatly appreciated.
function name() {
var divi = document.getElementById('form_div');
divi.style.display = 'none';
}
<div id='form_div'>
<form id='div_form'>
<input maxlength="15" style='position: center;' type="text" placeholder="Nick" id="namebox"/>
</form>
<button onclick='name();'>Go!</button>
<p>Type in your nick and press go!</p>
</div>
(This script element is placed before the html shown above)