Disclaimer: I have gone through the related questions, and could not find solutions to this particular issue. 

Scenario is this:

Based on whether the user selected a suggestion from the dropdown or if there are no matches, I want to execute different jQuery ajax actions. How do I do this? The place where I am stuck is how to capture the input that is currently in the autocomplete input text box?

Thanks