title: Replace window.location with anchor
body: <p>I have a select box, each row is a project. I want to click a project and redirect me to that project page. On every page I have the same select box. My select looks like this:</p>
  
  <pre><code>select class="select_box" name="state" style="width:200px;float:right;margin-right:45px;"&gt;
      &lt;? for(var i=0;i&lt;proiecte[0].length;i++){?&gt;
      &lt;option class="optiune" value="&lt;?=proiecte[0][i]?&gt;"&gt;&lt;?=proiecte[0][i]?&gt;&lt;/option&gt;
      &lt;? }?&gt;
      &lt;/select&gt;
  </code></pre>
  
  <p>The select box looks good. </p>
  
  <p>Now, my project link looks like this: </p>
  
  <pre><code>https://script.google.com/a/macros/COMPANY/s/AKfycbytWWGfWbOj_-Qi6eXwZraMgAS6xa0blmRfXVzLJV4/dev?page=project&amp;projectName=Name%20Of%20Project
  </code></pre>
  
  <p>As you can see I have 2 parameters in my URL. The first one does not need to change when I select an option from the select box, but the second one has to.
  Using jQuery, I succeeded in changing the project when I click on an option and redirect to that page.</p>
  
  <pre><code>$(document).ready(function(){
  $(".select_box").change(function(){
  console.log('Selected value: ' + $(this).val());
  var url = "&lt;?=getPathFromUrl(getScriptUrl());?&gt;?page=project&amp;projectName=";
  url += encodeURIComponent($(this).val());
  //window.location.replace(url);
  window.location.href = url; //i tried what TeilZeitMensch suggested
  });
  });
  </code></pre>
  
  <p>My problem is this one. I click on one project name and i am redirected to that page WITHOUT chaning my URL. For example, i am in project1 my URL is something like this: <code>....projectName=project1</code>. I click on another project, the info from that project loads, but the URL does not change, even if i change the parameters. 
  My next problem and the biggest is that i can only select one project. After i click on project2, it loads the info and the select options. But if i select project3, i get a blank page. I tried various combination of projects, always get a white page on second change.</p>
  
  <p>It should be said, that I am using Google Apps Script. </p>
  
  <p>EDIT: I use console.log, after I use <code>window.location.href = url;</code> and the url is correct. I only have a problem displaying it in the link bar.</p>
  
  <p>EDIT2: I found the solution:
  I put this in my HTML.</p>
  
  <pre><code>&lt;form id="projNavForm" action="&lt;?=getPathFromUrl(getScriptUrl());?&gt;"       method="GET"&gt;
  &lt;input type="hidden" name="page" value="project"/&gt;
  &lt;input type="hidden" name="projectName" value="" id="projectName"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>And I used this jQuery:</p>
  
  <pre><code>$(".select_box").change(function(){
  if($(this).val() != 'None'){
    $("#projectName").val($(this).val());
    $("#projNavForm").submit();
  }
  </code></pre>