Skip to content Skip to sidebar Skip to footer

Document.getelementbyid Sometimes Returns Null

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 ret

Solution 1:

Did you check that it's referring to an element with that id? Maybe you misspelled id="riskInStateInputType" in your <div></div> (or whatever that id is referring to).

Are you deleting the content within that element before you call it the second time perchance?

Post a Comment for "Document.getelementbyid Sometimes Returns Null"