title: Accesing variables declared in JAVASCRIPT in a different HTML FILE
body: <p>I have two files screen.html and db_fun.js.<br/>I have declared a variable at just the beginning as follows:<br/></p>
  
  <blockquote>
    <p>db_fun.js<br/>
    var name = "abc";</p>
  </blockquote>
  
  <p>now i tried to access this variable in the screen.html file as follows</p>
  
  <blockquote>
    <p>screen.html<br/></p>
  </blockquote>
  
  <pre><code>&lt;html&gt; 
   &lt;body&gt; 
     &lt;form name = "screen" action = "db_fun.js"&gt; 
          &lt;p&gt; &lt;script&gt;document.write(name);&lt;/script&gt; &lt;/p&gt;
     &lt;/form&gt;
   &lt;/body&gt;  
   &lt;script src="db_fun.js" type="text/javascript" /&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>it doesn't print nethn. Y so?</p>