title: Javascript window.onload not firing
body: <p>I am trying to write a javascript function that forces an element to have the style display = block.
  Currently it is being set to display = none by another piece of javascript.</p>
  
  <p>I thought <code>window.onload</code> would solve the problem as the code is then not being overridden  by the previous JS. The below code used to work and now the function just doesn't even fire.</p>
  
  <p>Can anyone Help?</p>
  
  <pre><code>          window.onload =  function ()   // It sets the class of the unordered list when the page has been loaded.
              {
                 ul.style.display = "block!important";   // Display all the child items
               }
  </code></pre>