title: Javascript only runs alert
body: <p>I'm trying to piece together a basic page using PHP &amp; JS to take me to a google map related to a search box. However the JS script will only run with an alert, no other function type will run: 
  The address bar just changes to "Domainx.com/?searchButton="</p>
  
  <p>The code for the button is:</p>
  
  <pre><code>                    &lt;button class="btn btn-success btn-lg" name="searchButton" onclick="searchFunction()"&gt;Search &lt;/button&gt;  
  </code></pre>
  
  <p>and directly under it (within the body) is have my script:</p>
  
  <pre><code>&lt;script&gt;
  function searchFunction() {
  alert("pressed");
  }
  
  &lt;/script&gt;
  </code></pre>
  
  <p>When i change the alert to anything else i.e.  window.location.href = "<a href="http://www.google.com" rel="nofollow">http://www.google.com</a>"</p>
  
  <p>it simple stays on the page and only the address bar changes. </p>