<div class="col-lg-6">
<div class="input-group">
<div class="input-group-btn">
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Choose</button>
<div class="dropdown-menu">
<option class="dropdown-item" onclick="filter('client')">Client</option>
<option class="dropdown-item" onclick="filter('site')">Site</option>
<option class="dropdown-item" onclick="filter('item')">Item</option>
</div>
</div>
<input id="searchstr" type="text" class="form-control" ><span class="input-group-btn">
<button class="btn btn-secondary" type="button" onClick="search()">Search</button>
</span>
</div>
</div>
<input type="hidden" value="" name="filter" id="filter">
<div class="clearfix spacer"></div>

<hr>

<div class="clearfix spacer"></div>


<h2 id="searchLabel"></h2>
<div id="searchData"></div>

<script>
$('#navBox').html('<a href="javascript:void(0)" class="sa1">Advanced Search</a>');

function filter(i){
$('#filter').val(i)
}

function search(){
var filter=$('#filter').val()
var searchstr=$('#searchstr').val()
$('#searchData').load('includes/master/search_data.php',{'searchstr':searchstr,'filter':filter},function(result){
//$('#searchLabel').text('Searching for '+searchstr+' in '+filter)

} )
}
</script>