title: IE throws JavaScript Error: The value of the property 'googleMapsQuery' is null or undefined, not a Function object (works in other browsers)
body: <p>I'm having a real problem with JavaScript scope in IE 9.</p>
  
  <p>This is inside the body of my document (yes, I realize script should go in the head for proper HTML, but I've never had it break a script before). The script is in the body because I don't want to mess with a shared header page for a script that is only relevant for this page:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function googleMapsQuery(accountNum) {
      // function code is here (omitted for brevity)
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>This is inside a <code>td</code> block inside a <code>tr</code> block inside a <code>tbody</code> block inside a <code>table</code> block inside a <code>form</code> block inside the <code>body</code>:</p>
  
  <pre><code>&lt;button id="google-422111" onclick="googleMapsQuery(422111)" type="button"&gt;Google This!&lt;/button&gt;
  </code></pre>
  
  <p>I even moved the script block above the form just in case the order of the script function declaration was relevant (it's not).</p>
  
  <p>The script works flawlessly in FireFox and Chrome, but in IE 9 (with or without compatibility view on), I get this error:</p>
  
  <blockquote>
    <p>SCRIPT5007: The value of the property 'googleMapsQuery' is null or undefined, not a Function object</p>
  </blockquote>
  
  <p>I studied JavaScript scope, and I cannot figure out any reason why IE thinks that 'googleMapsQuery' is a property, and why it is undefined. It's a function, and I defined it!</p>