title: set a value in .html file from an external .js file
body: <p>i have a main.js that handles Key pressed. and i have a index.html that i want to recieve some variables from main.js and make decisions about it. for example i want to send a url from main.js to index.html .. i try this code in my main.js but not worked.</p>
  
  <pre><code>document.getElementById("url").value = "http://example.com";
  </code></pre>
  
  <p>in my index.html i have:</p>
  
  <pre><code>&lt;form name="Params"&gt;
  &lt;input id="url" type="hidden" value=""&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>i just want to set value of my url input object from main.js.
  any help?</p>