title: How do I inject another JSP page into a <div> when clicking a link?
body: <p>I have two different divisions in a JSP page. One contains a menu of links, when clicked the div2 (id-content) loads different pages accordingly. I am doing something like -</p>
  
  <pre><code>&lt;div id="menu"&gt;
  &lt;ul class="navbar"&gt;
    &lt;li&gt;&lt;a name="login" href="Login.jsp" onclick="changeContent()"&gt;Login&lt;/a&gt;
     &lt;/li&gt;&lt;/div&gt;
  </code></pre>
  
  <p>and in the script I have something as - </p>
  
  <pre><code>&lt;script language="JavaScript"&gt;
  function changeContent() {
      document.getElementById('content').load('Login.jsp');
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>I also tried -</p>
  
  <pre><code>document.getElementById('content').innerHTML=
  "&lt;jsp:include page="Login.jsp"&gt;"; 
  </code></pre>
  
  <p>None of the ways worked. Please suggest how should I </p>