Jump to content


Photo

Search Form

search search form forms search button submit

  • Please log in to reply
3 replies to this topic

#1 SangeethaVarun

SangeethaVarun

    Newbie

  • New Members
  • Pip
  • 3 posts

Posted 26 November 2012 - 06:08 PM

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.Attached File  header.php   15.79KB   4 downloads

#2 SangeethaVarun

SangeethaVarun

    Newbie

  • New Members
  • Pip
  • 3 posts

Posted 26 November 2012 - 06:57 PM

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.

Edited by SangeethaVarun, 26 November 2012 - 07:02 PM.


#3 AyKay47

AyKay47

    Sick!

  • Members
  • PipPipPip
  • 3,287 posts
  • LocationEast Coast, U.S.
  • Age:24

Posted 26 November 2012 - 07:04 PM

Holy global batman!
Please post the relative code in this thread instead of an attachment.
Hola!
I'm not going to hold your hand and write the code for you - ain't nobody got time for that!

#4 SangeethaVarun

SangeethaVarun

    Newbie

  • New Members
  • Pip
  • 3 posts

Posted 26 November 2012 - 07:20 PM

<link rel="stylesheet" href="http://code.jquery.c.../jquery-ui.css" />
<script src="http://code.jquery.c...2.js"></script>
<script src="http://code.jquery.c...i.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();"> &nbsp;</div>';

}
$string .= '</form>';




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com