+ 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.
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;
}