Hi everyone,
I've got a search form on a website I'm working on, that allows users to search for movie titles. The search form works great with PHP, but I wanted to enhance it with jQuery and AJAX. I'm relatively new to jQuery and AJAX, just started working with it.
When typing in a movie title, the list of movies is dynamically populated below the search and gets smaller with more specificity. However, the problem is shortly after. It seems like the search does a re-search, even after finding a match.
I can type in Bruce Almighty and it will find the match, but then on its own, search for the letter B and give me results containing the letter B - which is a long list of titles. I have the PHP spitting back out what the user has searched for, so I can see that it at first searches for Bruce Almighty, but then all of a sudden is searching for B even if I have the full title in the search form.
This behaviour isn't very consistent, but it's enough to be a bit of a problem.
Does anyone have an idea why this is occurring? I am using the shorthand AJAX .post() function if that helps.
Thanks!
Ps. Sorry if this is in the wrong forum, but this seems like an AJAX thing, not a PHP thing.