title: What is causing the hash (#) in url to disappear?
body: <p>On a page with a url like <code>mypage.php#tab3</code> having a link that looks like:</p>
  
  <p><img src="https://i.stack.imgur.com/7skoa.png" alt="enter image description here"></p>
  
  <p>Clicking on Add results in the url shortening to <code>mypage.php#</code></p>
  
  <p>Code of the Add:</p>
  
  <pre><code>function addComment(i) {
      var s = document.getElementById(i);
  
      s.innerHTML = '';
      $('#'+i).attr('style','width:164px;padding-right:5px');
      $('#'+i).append('&lt;input type="text" id="ci'+i.substr(3)+'" style="width:162px;padding:0 3px" value=\'Enter comment here\' onclick=\"\" onblur="storeComment('+i.substr(3)+');"&gt;');
      return false;
  }
  </code></pre>
  
  <p>I added somes breaks and the hash disappears <strong>after</strong> the return false statement.</p>
  
  <p>Unsuccessful changes tried:</p>
  
  <ol>
  <li>With and without onclick</li>
  <li>With and without return false</li>
  </ol>
  
  <p>EDIT: The problem is in the link code.</p>
  
  <pre><code>&lt;a href="#" onclick="addComment('com94');"&gt;Add&lt;/a&gt;
  </code></pre>