title: Javascript external file causing Object Expected error in IE8 (Marketo)
body: <p>I've been pulling my hair out trying to solve this problem. We support IE8 and use a company called "Marketo" for some analytics. When I load their Javascript file as an external, then try to instantiate the class within the file, it throws a Javascript "Object expected" error in IE8. It does not cause this in Firefox or Safari.</p>
  
  <p>However, when I manually paste the contents of the external inside a <code>&lt;script&gt;</code> tag, the class instantiates fine! It's only when the Javascript file is external that the problem is caused. I must use an external because Marketo updates their code regularly and I can't keep on top of the copying/pasting.</p>
  
  <p>Here is the external: <a href="http://munchkin.marketo.net/munchkin.js" rel="nofollow">http://munchkin.marketo.net/munchkin.js</a></p>
  
  <p>Here is how I load the file:</p>
  
  <pre><code>&lt;script type="text/javascript" src="http://munchkin.marketo.net/munchkin.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Here is how I instantiate the class:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  mktoMunchkin("300-EOJ-215");
  &lt;/script&gt;
  </code></pre>
  
  <p>Using <code>setTimeout()</code> doesn't help anything (I thought maybe it was a slow server causing a timing issue):</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  setTimeout(function() {
      mktoMunchkin("300-EOJ-215");
  }, 5000);
  &lt;/script&gt;
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p><strong>UPDATE</strong>: Figured out what the problem was. We were delivering our webpage over HTTPS and pulling the Marketo munchkin.js file over HTTP, which for whatever reason IE8 (and not Firefox, Safari, etc.) had a problem with. Switched the URL to <code>https://munchkin.marketo.net/munchkin.js</code> and it was fine.</p>