[Koha-devel] Questions from a small library ...

Owen Leonard oleonard at athenscounty.lib.oh.us
Tue Oct 26 17:54:00 CEST 2004


> 1/. Auto Complete for Subjects
> So they are wondering wether they could start typing in a subject and 
> ones that match would come up in the list...

There is a method of refreshing the browser's display with information 
on the server without refreshing the whole page.  It uses javascript to 
instantly send text as you type to a script on the server side.  This 
script returns an include file that is added to the page via the DOM 
(Document Object Model).  See an explanation of one such system here:

http://blog4.bitflux.ch/wiki/LiveSearch

And an example in the right-hand search box here:

http://blog.bitflux.ch/

It's interesting--it does use Javascript, which obviously some folks 
think is evil.  I would classify this as non-evil javascript because it 
can degrade gracefully for other users--they can use the example search 
form just fine without JS, they just don't get the instant matching.

I doubt this would work well with a database that was very large, 
though--imagine you're trying to pull of subjects from your library 
database and the 'livesearch' function starts by pulling everything 
starting with 'd'.  It'd probably be too slow to be usable.

   -- Owen




More information about the Koha-devel mailing list