A multi-purpose auto-completing form select replacement which queries a server using AJAX for a list or tree of value/name pairs matching the users selection or text input.
The script will search the HTML for paired text box inputs (e.g. "user-manager", "user-manager-lookup") and apply javascript functions to these elements. When the user clicks the "-lookup" text box, a scrollable pop-up displays the results of a server AJAX query. Text entered in the lookup text box will be passed to the server as a prefix query, and the results list updated.
This project only comprises the client-side JavaScript element of the component, which will build the appropriate URL to query the server, and interpret the results in a standard JSON format as specified in the attached text file.
Large result sets can be paged using links below the list, which will trigger an AJAX update when clicked. Alternatively results can be returned in a hierarchical tree fashion, which the user can browse by expanding or contracting nodes. Expanding a new node will force another AJAX update. Results should be cached so that opening the same node or typing the same prefix will return cached results rather than touching the server again.