anchor.diff:  <jsp:include page="header-scripts.jsp" />
   
   <script>
  -    var currentDir = "<%= request.getAttribute("currentPath").toString()%>";
  +    var currentDir = "<%= request.getAttribute("currentPath").toString() %>";
       function getInputPath() {
           var path = $.trim($("#pathInput").val());
           return path;
  
positive.code:                 <li class="active"><a href="./browse?path=<%= encode(request.getAttribute("currentPath").toString(), "UTF-8") %>"><%= escapeHtml(((UIFileInfo) request.getAttribute("currentDirectory")).getName()) %></a></li>
                <% } %>
              </ul>
              <div id="pathNav" class="input-append pull-right" style="margin: 5px; margin-right: 45px;width:600px;">
                <input class="span12" id="pathInput" type="text" placeholder="Navigate to a directory">
                <button class="btn" id="goBtn" type="button">Go</button>
              </div>
  
negative.code:     function changeDir() {
          var path = getInputPath();
          path = encodeURI(path);
          window.location.href = "./browse?path=" + path;
      }
  
      $(document).ready(function () {
          if (base !== "./browse") {
              $("#pathNav").hide();
          } else { 
              // set currentDir as default value for #pathInput.
              $("#pathInput").val(currentDir);
              // when clicking #goBtn or enter the return key, change directory.
              $("#goBtn").click(changeDir);
              $("#pathInput").keydown(function (e) {
                  if (e.keyCode === 13) {
                      changeDir();
                  }
              });
  