+ 2

I have a bug I can't fix, please help!

I have been trying to fix this bug for literally an hour but can't fix it. Anyway, I have a public code named Adventure Capitalist and I am having a problem where it is saying that it Cannot set property 'disabled' of null and I have put a correct id onto my button and I have defined it correctly in my JS code. It would be great if someone could go into my code and find what is causing this issue.

24th Nov 2017, 12:08 AM
Joe Shanahan
Joe Shanahan - avatar
1 Answer
+ 4
[JS] tab is inserted by app just before </head>. Therefore the DOM isn't​ ready. // wait for DOM to load window.onload=function(){ document.getElementById('bug').disabled=true; }
24th Nov 2017, 12:18 AM
Kirk Schafer
Kirk Schafer - avatar