I have a type of AutoComplete search that i'm building and I was wondering if there was a way to use the up/down arrow keys to navigate through the results once the result div is shown.
The way it works is if results are returned from the database, populate the HTML of the div with the results and display the div directly under the input box, but I am not able to figure out how to then allow the user to use the arrow keys to navigate the results.
Example of the result HTML is;
<div id="divSearchResults" class="AutocompleteSearchResults cfn_ui_search_searchResults" style="visibility: hidden; left: 979px; top: 29px;">
<span>Open Client360 Household:</span>
<a target="_blank" href="/TestApp/default.aspx?ihhid=1">TestHH1</a>
<a target="_blank" href="/TestApp/default.aspx?ihhid=2">TestHH2</a>
<a target="_blank" href="/TestApp/default.aspx?ihhid=3">TestHH3</a>
</div>
i'd like to be able to have the user navigate with the arrow keys, but trying to do a .focus() on the div once it is visible doesn't allow this. I read some stuff about the tabindex being set, but that didn't seem to work for me either, and I figured since this is just a hidden element that only displays when there is a resultset that it might be more difficult.