title: JS to detect browser width and height works in Chrome & Safari but not IE9 or FF9
body: <p>Is there any reason why this code would work in Safari and Chrome but not IE or FF?</p>
  
  <p>JS</p>
  
  <pre><code>function load(){
      w.value = window.outerWidth;
      h.value = window.outerHeight;
  }
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>&lt;input name="h" id="h" type="hidden" value="" /&gt;
  &lt;input name="w" id="w" type="hidden" value="" /&gt;
  </code></pre>
  
  <p><a href="http://pastebin.com/dYx0ejCh" rel="noreferrer">Click here for the entire page's source code</a></p>
  
  <p>Thanks in advance for the assistance.</p>
  
  <p>Edit: I figured out what was wrong.  The following had to be added to the load function</p>
  
  <pre><code>var width = document.getElementById("w");
  var height = document.getElementById("h");
  width.value = window.outerWidth;
  height.value = window.outerHeight;
  </code></pre>