I have a line of code that is called in the onLoad event of a page, and it works fine. Inside the onload event, other functions are called, and trying the same line of code now returns null.
Code verbatim
riskInStateInputTypeElement = document.getElementById("riskInStateInputType");
Are there any instances where getElementById begins returning null after having returned the correct thing previously?
The line that works and the line that doesn't work are both in the same call stack, not separate events or threads. The Document readyStatus is 'complete' both time, so I dont think its a matter of the page not entirely loaded. Any ideas where I should look?