I have been trying to use the document.getElementByID to pull information from an HTML file from an external JS file and it does not seem to be working. Does the document.getElementByID only work if it is inline with the HTML file or can it work properly on an external JS file? The JS file is called upon within the HTML document properly because other functions are working.
I have been trying to use the document.getElementByID to pull information from an HTML
Share
No.
Yes.
You’re probably calling
document.getElementById()before the DOM is ready.