add term autocomplete javascript