title: Issue with calling a javascript file from a HTML page
body: <p>I have two files, one called TestKeyboard.html, from which I call the javascript code file AutomaticKeyboardChange.js.<br>
  Here is the html page :  </p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
              &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  
              &lt;title&gt; including file &lt;/title&gt;
              &lt;script type="text/javascript" src="C:/Users/mounaim/Desktop/Javascript Tests/AutomaticKeyboardChange.js"&gt; &lt;/script&gt;
      &lt;/head&gt; 
          &lt;body&gt;
                  &lt;p id="demo"&gt; Here I'm testing some code with javascript &lt;/p&gt; &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;
  
                  &lt;input id="firstname" type="text" &gt; &lt;/input&gt;
          &lt;/body&gt;
  
  
  &lt;/html&gt;
  </code></pre>
  
  <p>and here is the javascript file :  </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  window.onload = function(){
  var KEYS_MAP = {
  
              65 :"ض",
  
              90 :"ص",
  
              69 :"ث",
  
  
              82 :"ق",
  
  
              84 :"ف",
  
  
              89 :"غ",
  
  
              85 :"ع",
  
  
              73 :"ه",
  
  
              79 :"خ",
  
  
              80 :"ح",
  
  
              221 :"ج",
  
  
              81 :"ش",
  
  
              83 :"س",
  
  
              68 :"ي",
  
  
              70 :"ب",
  
  
              71 :"ل",
  
  
              72 :"ا",
  
  
              74 :"ت",
  
  
              75 :"ن",
  
  
              76 :"م",
  
  
              77 :"ك",
  
  
              192 :"ط",
  
  
              220 :"ذ",
  
  
              87 :"ئ",
  
  
              88 :"ء",
  
  
              67 :"ؤ",
  
  
              86 :"ر",
  
  
              66 :"ل",
  
  
              78 :"ى",
  
  
              188 :"ة",
  
  
              190 :"و",
  
  
              191 :"ز",
  
  
              223 :"ظ",
  
              186 : "د"
  
     };
  //Ici à la place de "firstname" faites rentrer l'id du champ pour lequel on veut activer la conversion
  document.getElementById("firstname").onkeydown = function myFunction(e){
    var keyCode = window.event ? window.event.keyCode : e.which;
    if(keyCode == 66) {
                this.value += "ل";
                this.value +="ا"
                return false;
    }
  
    else{
        if(keyCode &amp;&amp; KEYS_MAP[keyCode]){
                this.value += KEYS_MAP[keyCode];
                return false;
      }
    };
  }
  }
  
  
  
  &lt;/script&gt;
  </code></pre>
  
  <p>When I load the HTML page, the script is not running ! why ?<br>
  Any help greatly appreciated</p>