title: External Javascript function doesn't work ONLY in Firefox
body: <p>I'm in a situation, where I need to show the same information on two different domains in both danish and english. The information on these sites are updated quite often (small updates), and we're forced to operate with two more or less outdated CMS's. To prevent updating 4 different pages in total and the possible change that inconsistense could happen, we've decided to write the page external and include them by using javascript. The english and danish text is therefore combined in one single javascript, and the four pages is just empty shells ready to be filled in, as you can see below:</p>
  
  <pre><code>    &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;&lt;/title&gt;
          &lt;meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type" /&gt;
          &lt;link rel="stylesheet" type="text/css" href="https://blanketter.science.ku.dk/studievejledning/studievejledning.css" /&gt;
  &lt;script src="https://blanketter.science.ku.dk/studievejledning/studievejledning-content.js" type="text/javascript"&gt; &lt;/script&gt;
          &lt;script type="text/javascript" src="https://blanketter.science.ku.dk/studievejledning/skemadk.js"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
  &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
  &lt;div id="container"&gt;
          &lt;div id="dynamic-intro"&gt;&lt;/div&gt;
          &lt;div id="dynamic-specialOpeningHours"&gt;&lt;/div&gt;
          &lt;div id="dynamic-contact"&gt;&lt;/div&gt;
          &lt;div id="dynamic-closedWeeks"&gt;&lt;/div&gt;
          &lt;div id="dynamic-openingHours"&gt;&lt;/div&gt;
  
          ..
  
          &lt;div class="aflysninger"&gt;&lt;img alt="" src="http://www.science.ku.dk/uddannelser/studenterservice/icon-green.png" /&gt; Vejledning på &lt;strong&gt;Nørre Campus, Green Lighthouse - Tagensvej 16A&lt;/strong&gt; (&lt;a href="http://www.science.ku.dk/uddannelser/studenterservice/vejviser/"&gt;find vej&lt;/a&gt;)&lt;br /&gt;
          &lt;img alt="" src="http://www.science.ku.dk/uddannelser/studenterservice/icon-blue.png" /&gt; Vejledning på &lt;strong&gt;Frederiksberg Campus - Thorvaldensvej 40&lt;/strong&gt; (&lt;a href="http://www.science.ku.dk/uddannelser/studenterservice/vejviser/"&gt;find vej&lt;/a&gt;)&lt;br /&gt;
          &lt;/div&gt;
          &lt;script language="JavaScript" type="text/javascript"&gt;
  document.getElementById('content').className = "subpage wide";
  &lt;/script&gt;
          &lt;script type="text/javascript"&gt;
  
  if(typeof writePageByLanguage === typeof undefined){
  document.getElementById('container').innerHTML = "Error";
  } else {
  writePageByLanguage('danish');
  showGenere();
  }
  &lt;/script&gt;
  &lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I have left some out in the middle, it was just an empty (but 50+ lines) table.</p>
  
  <p>The script containing the content is loaded by this reference:</p>
  
  <pre><code>&lt;script src="https://blanketter.science.ku.dk/studievejledning/studievejledning-content.js" type="text/javascript"&gt; &lt;/script&gt;
  </code></pre>
  
  <p>The page is "filled out" when the following method is called:</p>
  
  <pre><code>writePageByLanguage('danish');
  </code></pre>
  
  <p>The thing is - It works!... Almost everywhere. In IE - haven't encounted problems yet. Chrome - no problems! My Firefox (ESR 17.0.9) - no problems.. But my colleagues with ESR 17.0.9 get's the error page which is shown, when the method "writePageByLanguage(..)" is undefined -> not loaded? Same for my colleague with Firefox 24.0</p>
  
  <p>I'm looking for at least some way to explain to the users, how they can change their settings to view the page instead of accessing it through another browser. Got any ideas?</p>
  
  <p>The page itself can be found here (in english ofc):
  <a href="http://www.science.ku.dk/english/courses-and-programmes/studentservices/guidance/" rel="nofollow">http://www.science.ku.dk/english/courses-and-programmes/studentservices/guidance/</a></p>
  
  <p>Do you get the error message? Do you know the problem? I believe it has got to be the external reference somehow, but since it works in other browsers, I don't get it?</p>
  
  <p><strong>UPDATED:</strong></p>
  
  <p>I have run the script through Lint and found a few smaller errors, but that haven't resolved the problem.</p>
  
  <p>I found out that the script itself is never loaded according to the web debugger tool in Firefox:</p>
  
  <p>[12:47:26.428] GET <a href="https://blanketter.science.ku.dk/international/international-content.js" rel="nofollow">https://blanketter.science.ku.dk/international/international-content.js</a> [Not defined]</p>
  
  <p>But my browser which is the very same Firefox version have no problems to load the script:
  [HTTP/1.1 304 Not Modified 15ms]</p>