Forum Moderators: open
First here is the snippet of script...
document.getElementById('menu');
Before (working)
<script src="script.js" type="text/javascript"></script>
<select id="menu">
After (not working)
<script src="script.js" type="text/javascript"></script>
<div>
<select id="menu">
The odd thing is even originally the script include line would only work when it was inside the body (as opposed to where I would put it in the head).
So the question again is, how do I select this element id correctly?