title: How to fix 'Included content of the div ' error in PHP
body: <p>I am trying to change the content of the page on the link of the specified page is clicked, yes is changing but on refresh the page it is like is not including the CSS and javascript, not to forget the footer and header is fixed that is what am trying to avoid refreshing </p>
  
  <p>this is the div in index page that its content supposed to change, the first included home page by default is scrolling up to the bottom ,but when  other pages content changes it does not scroll up to the bottom, if you inspect the code I found that it does not include the upper and the lower codes of index page.</p>
  
  <p>This index page:</p>
  
  <pre><code>&lt;!-- //header-ends --&gt;
  
      &lt;div id="mainContent" class="page-wrapper"&gt;
      &lt;?php include('home.php')?&gt;
      &lt;/div&gt;
  
          &lt;!--footer section start--&gt;
              &lt;?php include('includes/footer.php')?&gt;
          &lt;!--footer section end--&gt;
  </code></pre>
  
  <p>this is how am opening link:</p>
  
  <pre><code>&lt;li&gt;&lt;a  href="#" onclick="openPage('radio.php')"&gt;&lt;i class="camera"&gt;&lt;/i&gt; &lt;span&gt;Radio&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
  </code></pre>
  
  <p>This is the javascript function:</p>
  
  <pre><code>function openPage(url) {
  
      if(timer != null) {
          clearTimeout(timer);
      }
  
      if(url.indexOf("?") == -1) {
          url = url + "?";
      }
  
      var encodedUrl = encodeURI(url);
      $("#mainContent").load(encodedUrl);
      $("body").scrollTop(0);
  
  }
  </code></pre>
  
  <p>I expect when the page content changes the page should scroll to the bottom and the loaded page content not to show lack of CSS link.</p>