SangeethaVarun
-
Posts
3 -
Joined
-
Last visited
Posts posted by SangeethaVarun
-
-
Hi
I am working with search form in php.
I want my search button to work with autocomplete for three search bars. Kindly guide me with the coding for the search button to get connected with the result displaying.
Please find attached my header file. The autocomplete is working, fetching the values from the database but I want - when we click on search button it should display the result.
Thanks in advance. Expecting the reply from you soon.
-
Hi
I am working with search form in php.
I want my search button to work with autocomplete for three search bars. Kindly guide me with the coding for the search button to get connected with the result displaying.
Please find attached my header file. The autocomplete is working, fetching the values from the database but I want - when we click on search button it should display the result.
Thanks in advance. Expecting the reply from you soon.header.php
Search Form
in PHP Coding Help
Posted
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css" />
<script>
$(function() {
$( "#s" ).autocomplete({
source: "http://search_category.php",
minLength: 1,
select: function( event, ui ) {
$('#s').val(ui.item.s);
},
});
$( "#catsearch" ).autocomplete({
source: "http://search_location.php",
minLength: 1,
select: function( event, ui ) {
$('#catsearch').val(ui.item.catsearch);
},
});
$( "#company" ).autocomplete({
source: "http://search_company.php",
minLength: 1,
select: function( event, ui ) {
$('#company').val(ui.item.company);
},
});
});
</script>
$string .= "<form method='get' action='".$GLOBALS['bloginfo_url']."/' name='searchBox' id='searchBox'>
<input placeholder='e.g. Plumbers' id='category' /> <input id='location' placeholder='e.g. Town/City' /> " ;
$string .= '<input placeholder="e.g. Pizza Hut" class="cocolor" id="company" name="cat">'; /*id=catsearch*/
}
}
$string .= '<div class="searchBtn left" onclick="document.searchBox.submit();"> </div>';
}
$string .= '</form>';