document.getElementByID external or inline?
dom, html, javascript, jquery
Solution
Does the document.getElementByID only work if it is inline with the HTML file
No.
can it work properly on an external JS file?
Yes.
You're probably calling `document.getElementById()` before the DOM is ready.
Problem
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.