Creating an Instant Search

Joseph Smith · 102K views · 2012 · 8:39

Open on YouTube

Web developmentPython, Ruby & scripting languagestutorialdated

Why Stack Overflow recommends it

Stack Overflow users cite it as the guide they followed to build an instant search in PHP and jQuery, then ask for help extending or porting it (to WordPress, radio filters, or a Google-style dropdown).

Recommended by 1 people across 1 different months, 2014 to 2017.

What it is

A short 2012 tutorial by Joseph Smith (Helping Develop) that adds an instant, search-as-you-type effect to an earlier PHP and MySQL search using jQuery and JavaScript. It walks through a small AJAX call that posts the typed text to a PHP script and renders the results live.

What people said

Recommends Jacob · 2017-01 · Stack Overflow · on “Implementing jquery ajax in wordpress?”

I am new to jquery and have been following this guide on how to create instant search via jquery: [this video] I a trying to implement this on my wordpress site, but apparently things work differently when it comes to a wordpress site. I am kind of looking for a "how to"-guide in basic steps on how to implement instant search on a wordpress site :) Currently when I try to search(with the setup from the video), i get the following error in the browser console: Failed to load resource: the server responded with a status of 404 (Not Found) Hope that someone can help :)

Cites user3616064 · 2014-05 · Stack Overflow · on “Instant database search php, jquery”

I'm trying to make my regular search to achive instant search like googles which return the search result and you can click on that link to get to the "Search page" where it will display the full result. i followed this video [this video] from Helping Develop. <script type="text/javascript" src="js/jquery-1.11.0.min.js"></script> <script type="text/javascript"> function searchq (){ var searchTxt= $("input[name='search']").val(); $.post("instant.php", {searchVal: searchTxt}, function (output){ $("#output").html(output) }); } </script> <form action="Search_page.php" method="post"> <input type="text" name="search" onkeydown="searchq();"/> <input type="submit" name="submit" value="" id="button" /> </

Cites Linus Aronsson · 2015-12 · Stack Overflow · on “PHP + MYSQL instant search with radio button filtering”

I have with the help of this guide [this video] created a working search form that displays instant search results (without having to press submit button) with PHP and MYSQL. Then I wanted to filter the search results depending on what radio button is pressed. Now I also got this to work (partly with the help of this guide [LINK] ) but ONLY when pressing submit on my search form. It does not work with instant search results for some reason, and that is my problem. index.php (form): <form class="form-custom" role="search" action="index.php" method="POST"> <div class="form-group"> <label for="all" class="radio-btn"> <input id="all" class="radio-custom" type="radio" name="searchfilter" value="all" c