is there anyway i could put this javascript code in head tag?
<p>i have few div's in my form which needs to be hidden at first i.e onLoad. the problem is when i put that into <code>&lt;head&gt;</code> tag it will try and execute first giving out the error that div has value null, and when i include it below the form it works perfectly. for example</p>

<p>this code works fine given the JS code is placed below.</p>

<pre><code>&lt;div class="error" id="name_error"&gt;&lt;p&gt;Input Name&lt;/p&gt;&lt;/div&gt;
&lt;input type="text" id="name" name="name" class="input-text" value="Enter Name..."/&gt;

&lt;script type="text/javascript"&gt;
     document.getElementById('name_error').style.display = 'none';
&lt;/script&gt;
</code></pre>

<p>and when i try placing the JS code above it doesn't work.</p>

<p>is there anyway i could place the JavaScript code in head tag and it should hide the div when the page loads?</p>
