so im having an issue with some javascript and html.
in my html i have a button set up with an id
<td><button id = "accept">Accept</button></td>
and in the javascript onload function i have
acceptButton = document.getElementById("accept");
But for some reason it just started to say, variable implicitly declared , and when i try add anymore javascript, the button does not function. I am very new to javascript and really struggling to work out what this issue is due to, can someone maybe shed some light on it? thanks
I tried adding var, it takes away the error but stops the buttons functionality