Your HTML is completely messed up - for example:
<button type="button" id ="searchID" name = "searchID" onclick="searchForm('searchDetails.php')" class="btn btn-primary">
tag doesn't match the opening
It also doesn't make sense for your search code to run when you click on the "Name:" label, rather than the submit button.
Once you've fixed your HTML, change your script to execute when the form is submitted, and prevent the default action: