Did you know ... Search Documentation:
Pack weblog -- prolog/html_form/autocomplete.pl
PublicShow source

jQuery based autocomplete widget

 autocomplete(+Generator:callable)// is det
Inserts an autocomplete input item

Generator is an arity n term that corresponds to an arity n+1 predicate.

autocomplete//1 will repeatedly query Generator for information and build up the autocomplete field. The final argument may be

  • choice(-Atom) A choice for the autocomplete field
  • id(-ID) The input field id will be set to this. default tags
  • ajax The generator will be called repeatedly with choice(+Term, -Choice) where Term is an atom representation of the current contents of the field, and Choice is an atom representation of one of the choices