title: How to import javascript variable from .js file to html document
body: <p>I am trying to print out a variable from a default.js file. That variable counts up to a number, which I want to print on the html page.</p>
  
  <p>So as it is now, I have:</p>
  
  <pre><code>We found &lt;script type="text/javascript"&gt; 
      var $tempCountPlaces;
      document.write($tempCountPlaces); &lt;/script&gt; places for you!
  
      &lt;div id="places_list"&gt;
      &lt;script type="text/javascript"&gt;
  
        var places_file = '&lt;?php echo site_url().'/places.html'; ?&gt;';
        var region_id = &lt;?php echo $region; ?&gt;;
        var event_type_id = &lt;?php echo $eventtype; ?&gt;;
        var seats = '&lt;?php echo $seats; ?&gt;';      
  
      &lt;/script&gt;
  </code></pre>
  
  <p>As you can see, I can send files from PHP to Javascript, and then use these variables in the default.js file. But how do I import a variable from default.js to the html page, and then print the variable, as shown above?</p>
  
  <p>The <code>var $tempCountPlaces;</code> IS defined in the default.js file, and it is not a local variable within a function.</p>
  
  <p>So basicly i want to pass the variable from default.js $tempCountPlaces into my HTML file using the script tag.</p>