Just implemented an Ajax live search on a website.
Here’s the search page. Results are displayed in div output.
Here’s the links-ajax.php which display the search results with links.
0) {
while ($user = mysqli_fetch_array($result)) {
echo "".$user['name']."
";
}
} else {
echo "No results found...
";
}
}
?>
I couldn’t get the links working, until I added the 500ms of timeout in .focusout.