track7
sign in

ajax suggest

advanced ajax, css, js, mysql, php 4708 misterhaan

using ajax to suggest possible values when a user starts typing in a field can help get more consistent values as well as saving time for users. i wanted to add an ajax suggest feature to track7 and couldn’t find all the information i needed in one place, so i decided to write up what i learned. this guide walks through the steps of creating an ajax suggest feature that supports selection with keyboard or mouse from scratch using javascript, css, php, and mysql. usernames are used as an example since that’s the first place track7 used ajax suggest. this guide will make more sense to those with intermediate knowledge of javascript and basic knowledge of ajax and css.

track7 no longer uses this method. an updated guide, ajax user suggest explains how to reach a similar result using jquery and knockout.

how was it?